home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-04-23 | 15.8 KB | [TEXT/PJMM] |
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: ICGenericOverride.p
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| ZX81 Sinclair BASIC (image/sinclairBASIC)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Sat Apr 22 23:54:10 1995, modified Sat Apr 22 23:54:10 1995, creator Think Pascal, type ASCII, 14807 bytes "ICGenericOverride.p" , at 0x3a57 1075 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [PJMM] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 13 49 43 47 65 6e 65 | 72 69 63 4f 76 65 72 72 |..ICGene|ricOverr|
|00000010| 69 64 65 2e 70 00 00 00 | 00 00 00 00 00 00 00 00 |ide.p...|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 50 4a 4d | 4d 01 00 00 00 00 00 00 |.TEXTPJM|M.......|
|00000050| 00 00 00 00 00 39 d7 00 | 00 04 33 ab bf 7f e2 ab |.....9..|..3.....|
|00000060| bf 7f e2 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 4e dc 00 00 |........|....N...|
|00000080| 75 6e 69 74 20 49 43 47 | 65 6e 65 72 69 63 4f 76 |unit ICG|enericOv|
|00000090| 65 72 72 69 64 65 3b 0d | 0d 28 2a 20 49 6e 74 65 |erride;.|.(* Inte|
|000000a0| 72 6e 65 74 20 43 6f 6e | 66 69 67 20 47 65 6e 65 |rnet Con|fig Gene|
|000000b0| 72 69 63 20 4f 76 65 72 | 69 64 65 20 43 6f 6d 70 |ric Over|ide Comp|
|000000c0| 6f 6e 65 6e 74 20 2a 29 | 0d 0d 28 2a 20 52 6f 75 |onent *)|..(* Rou|
|000000d0| 74 69 6e 65 20 6e 61 6d | 65 73 20 68 61 76 65 20 |tine nam|es have |
|000000e0| 61 6e 20 49 43 47 4f 20 | 70 72 65 66 69 78 20 66 |an ICGO |prefix f|
|000000f0| 6f 72 20 49 6e 74 65 72 | 6e 65 74 20 43 6f 6e 66 |or Inter|net Conf|
|00000100| 69 67 20 47 65 6e 65 72 | 69 63 20 4f 76 65 72 72 |ig Gener|ic Overr|
|00000110| 69 64 65 2e 20 2a 29 0d | 0d 28 2a 20 54 68 69 73 |ide. *).|.(* This|
|00000120| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 69 73 20 74 68 | compone|nt is th|
|00000130| 65 20 66 72 61 6d 65 77 | 6f 72 6b 20 66 6f 72 20 |e framew|ork for |
|00000140| 61 6e 20 49 6e 74 65 72 | 6e 65 74 20 43 6f 6e 66 |an Inter|net Conf|
|00000150| 69 67 20 6f 76 65 72 72 | 69 64 65 20 2a 29 0d 28 |ig overr|ide *).(|
|00000160| 2a 20 63 6f 6d 70 6f 6e | 65 6e 74 2e 20 49 27 76 |* compon|ent. I'v|
|00000170| 65 20 75 73 65 64 20 69 | 74 20 74 6f 20 72 65 70 |e used i|t to rep|
|00000180| 6c 61 63 65 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |lace the| origina|
|00000190| 6c 20 49 43 20 52 65 61 | 64 4f 6e 6c 79 20 61 6e |l IC Rea|dOnly an|
|000001a0| 64 20 2a 29 0d 28 2a 20 | 49 43 20 52 61 6e 64 6f |d *).(* |IC Rando|
|000001b0| 6d 53 69 67 6e 61 74 75 | 72 65 20 63 6f 6d 70 6f |mSignatu|re compo|
|000001c0| 6e 65 6e 74 73 20 62 6f | 64 69 65 73 20 77 69 74 |nents bo|dies wit|
|000001d0| 68 20 6f 6e 65 20 63 6f | 6d 6d 6f 6e 20 62 6f 64 |h one co|mmon bod|
|000001e0| 79 2e 20 2a 29 0d 28 2a | 20 54 68 65 20 64 69 66 |y. *).(*| The dif|
|000001f0| 66 65 72 65 6e 74 20 62 | 65 74 77 65 65 6e 20 74 |ferent b|etween t|
|00000200| 68 65 20 74 77 6f 20 63 | 6f 6d 70 6f 6e 65 6e 74 |he two c|omponent|
|00000210| 73 20 69 73 20 6e 6f 77 | 20 63 6f 6e 74 61 69 6e |s is now| contain|
|00000220| 65 64 20 69 73 6f 6c 61 | 74 65 64 20 2a 29 0d 28 |ed isola|ted *).(|
|00000230| 2a 20 69 6e 20 61 20 73 | 65 70 61 72 61 74 65 20 |* in a s|eparate |
|00000240| 66 69 6c 65 2c 20 49 43 | 53 70 65 63 69 66 69 63 |file, IC|Specific|
|00000250| 4f 76 65 72 72 69 64 65 | 2e 20 2a 29 0d 0d 28 2a |Override|. *)..(*|
|00000260| 20 54 68 65 20 63 6f 6d | 70 6f 6e 65 6e 74 20 6f | The com|ponent o|
|00000270| 76 65 72 72 69 64 65 73 | 20 74 68 65 20 49 6e 74 |verrides| the Int|
|00000280| 65 72 6e 65 74 20 43 6f | 6e 66 69 67 20 45 78 74 |ernet Co|nfig Ext|
|00000290| 65 6e 73 69 6f 6e 20 61 | 6e 64 20 2a 29 0d 28 2a |ension a|nd *).(*|
|000002a0| 20 70 61 73 73 65 73 20 | 61 6c 6c 20 63 61 6c 6c | passes |all call|
|000002b0| 73 20 74 68 72 6f 75 67 | 68 20 74 6f 20 74 68 65 |s throug|h to the|
|000002c0| 20 73 70 65 63 69 66 69 | 63 20 6f 76 65 72 72 69 | specifi|c overri|
|000002d0| 64 65 20 74 6f 20 64 65 | 74 65 72 6d 69 6e 65 20 |de to de|termine |
|000002e0| 2a 29 0d 28 2a 20 77 68 | 65 74 68 65 72 20 69 74 |*).(* wh|ether it|
|000002f0| 20 73 68 6f 75 6c 64 20 | 62 65 20 6f 76 65 72 72 | should |be overr|
|00000300| 69 64 64 65 6e 2e 20 2a | 29 0d 0d 28 2a 20 54 68 |idden. *|)..(* Th|
|00000310| 69 73 20 63 6f 64 65 20 | 68 61 73 20 66 6f 6c 6c |is code |has foll|
|00000320| 6f 77 65 64 20 61 20 66 | 61 69 72 6c 79 20 6c 6f |owed a f|airly lo|
|00000330| 6e 67 20 70 61 74 68 2d | 2d 4a 61 67 65 72 20 77 |ng path-|-Jager w|
|00000340| 61 73 20 74 68 65 20 6f | 6e 65 20 77 68 6f 20 2a |as the o|ne who *|
|00000350| 29 0d 28 2a 20 6f 72 69 | 67 69 6e 61 6c 6c 79 20 |).(* ori|ginally |
|00000360| 73 74 61 72 74 65 64 20 | 74 68 65 20 77 6f 72 6b |started |the work|
|00000370| 20 6f 6e 20 74 68 65 20 | 52 61 6e 64 6f 6d 20 53 | on the |Random S|
|00000380| 69 67 6e 61 74 75 72 65 | 20 63 6f 6d 70 6f 6e 65 |ignature| compone|
|00000390| 6e 74 2e 20 2a 29 0d 28 | 2a 20 49 20 62 61 73 65 |nt. *).(|* I base|
|000003a0| 64 20 6d 79 20 63 6f 64 | 65 20 6f 6e 20 68 69 73 |d my cod|e on his|
|000003b0| 20 63 6f 64 65 20 61 6e | 64 20 74 72 69 65 64 20 | code an|d tried |
|000003c0| 74 6f 20 67 65 74 20 69 | 74 20 77 6f 72 6b 2c 20 |to get i|t work, |
|000003d0| 69 6e 20 74 68 65 20 2a | 29 0d 28 2a 20 70 72 6f |in the *|).(* pro|
|000003e0| 63 65 73 73 20 66 69 6e | 64 69 6e 67 20 61 6e 64 |cess fin|ding and|
|000003f0| 20 75 73 69 6e 67 20 73 | 6f 6d 65 20 73 61 6d 70 | using s|ome samp|
|00000400| 6c 65 20 63 6f 64 65 20 | 66 72 6f 6d 20 61 20 64 |le code |from a d|
|00000410| 65 76 65 6c 6f 70 20 61 | 72 74 69 63 6c 65 2e 20 |evelop a|rticle. |
|00000420| 2a 29 0d 28 2a 20 45 72 | 69 63 20 74 72 61 6e 73 |*).(* Er|ic trans|
|00000430| 6c 61 74 65 64 20 74 68 | 65 20 67 65 6e 65 72 69 |lated th|e generi|
|00000440| 63 20 20 70 61 72 74 73 | 20 6f 66 20 52 61 6e 64 |c parts| of Rand|
|00000450| 6f 6d 20 53 69 67 6e 61 | 74 75 72 65 20 74 6f 20 |om Signa|ture to |
|00000460| 43 20 74 6f 20 2a 29 0d | 28 2a 20 69 6d 70 6c 65 |C to *).|(* imple|
|00000470| 6d 65 6e 74 20 61 20 63 | 6f 6d 70 6f 6e 65 6e 74 |ment a c|omponent|
|00000480| 20 6f 66 20 68 69 73 20 | 6f 77 6e 20 28 66 69 78 | of his |own (fix|
|00000490| 69 6e 67 20 62 75 67 73 | 20 61 6e 64 20 72 65 77 |ing bugs| and rew|
|000004a0| 72 69 74 69 6e 67 20 61 | 6c 6f 6e 67 20 2a 29 0d |riting a|long *).|
|000004b0| 28 2a 20 74 68 65 20 77 | 61 79 29 2c 20 61 6e 64 |(* the w|ay), and|
|000004c0| 20 74 68 65 6e 20 6d 6f | 64 69 66 69 65 64 20 74 | then mo|dified t|
|000004d0| 6f 20 64 75 70 6c 69 63 | 61 74 65 20 74 68 65 20 |o duplic|ate the |
|000004e0| 62 65 68 61 76 69 6f 72 | 20 6f 66 20 2a 29 0d 28 |behavior| of *).(|
|000004f0| 2a 20 49 43 20 52 65 61 | 64 4f 6e 6c 79 2e 20 53 |* IC Rea|dOnly. S|
|00000500| 69 6e 63 65 20 74 68 65 | 6e 20 49 20 68 61 76 65 |ince the|n I have|
|00000510| 20 70 6f 72 74 65 64 20 | 74 68 65 20 63 68 61 6e | ported |the chan|
|00000520| 67 65 73 20 62 61 63 6b | 20 74 6f 20 50 61 73 63 |ges back| to Pasc|
|00000530| 61 6c 20 2a 29 0d 28 2a | 20 74 6f 20 66 6f 72 6d |al *).(*| to form|
|00000540| 20 74 68 65 20 62 61 73 | 69 73 20 6f 66 20 74 68 | the bas|is of th|
|00000550| 69 73 20 67 65 6e 65 72 | 69 63 20 6f 76 65 72 72 |is gener|ic overr|
|00000560| 69 64 65 20 63 6f 6d 70 | 6f 6e 65 6e 74 2c 20 77 |ide comp|onent, w|
|00000570| 68 69 63 68 20 49 27 76 | 65 20 2a 29 0d 28 2a 20 |hich I'v|e *).(* |
|00000580| 75 73 65 64 20 66 6f 72 | 20 74 68 65 20 49 43 20 |used for| the IC |
|00000590| 31 2e 31 20 6f 76 65 72 | 72 69 64 65 20 63 6f 6d |1.1 over|ride com|
|000005a0| 70 6f 6e 65 6e 74 73 2e | 20 2a 29 0d 0d 28 2a 20 |ponents.| *)..(* |
|000005b0| 43 6f 6e 73 69 64 65 72 | 20 69 74 20 61 20 63 6f |Consider| it a co|
|000005c0| 6c 6c 61 62 6f 72 61 74 | 69 76 65 20 77 6f 72 6b |llaborat|ive work|
|000005d0| 2c 20 61 73 20 45 72 69 | 63 20 2a 29 0d 28 2a 20 |, as Eri|c *).(* |
|000005e0| 73 61 79 73 20 22 61 20 | 62 69 74 20 6f 66 20 61 |says "a |bit of a|
|000005f0| 20 46 72 61 6e 6b 65 6e | 73 74 65 69 6e 27 73 20 | Franken|stein's |
|00000600| 6d 6f 6e 73 74 65 72 22 | 2e 20 2a 29 0d 0d 28 2a |monster"|. *)..(*|
|00000610| 20 54 68 69 73 20 72 65 | 6c 65 61 73 65 20 66 69 | This re|lease fi|
|00000620| 78 65 73 20 61 20 6e 61 | 73 74 79 20 62 75 67 20 |xes a na|sty bug |
|00000630| 69 6e 20 74 68 65 20 50 | 61 73 63 61 6c 20 65 78 |in the P|ascal ex|
|00000640| 61 6d 70 6c 65 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |ample co|mponents|
|00000650| 2c 20 6f 6e 65 20 77 68 | 69 63 68 20 2a 29 0d 28 |, one wh|ich *).(|
|00000660| 2a 20 70 72 65 76 65 6e | 74 73 20 74 68 65 6d 20 |* preven|ts them |
|00000670| 66 72 6f 6d 20 6c 6f 61 | 64 69 6e 67 20 69 66 20 |from loa|ding if |
|00000680| 74 68 65 69 72 20 6d 61 | 6e 75 66 61 63 74 75 72 |their ma|nufactur|
|00000690| 65 72 20 63 6f 64 65 20 | 63 6f 6d 65 73 20 61 66 |er code |comes af|
|000006a0| 74 65 72 20 2a 29 0d 28 | 2a 20 74 68 61 74 20 6f |ter *).(|* that o|
|000006b0| 66 20 61 20 70 72 65 76 | 69 6f 75 73 6c 79 20 72 |f a prev|iously r|
|000006c0| 65 67 69 73 74 65 72 65 | 64 20 63 6f 6d 70 6f 6e |egistere|d compon|
|000006d0| 65 6e 74 2e 20 49 66 20 | 79 6f 75 20 75 73 65 20 |ent. If |you use |
|000006e0| 61 6e 79 20 63 6f 6d 70 | 6f 6e 65 6e 74 20 2a 29 |any comp|onent *)|
|000006f0| 0d 28 2a 20 62 61 73 65 | 64 20 6f 6e 20 74 68 69 |.(* base|d on thi|
|00000700| 73 20 63 6f 64 65 2c 20 | 74 68 65 20 6f 6c 64 20 |s code, |the old |
|00000710| 76 65 72 73 69 6f 6e 73 | 20 6f 66 20 49 43 20 52 |versions| of IC R|
|00000720| 65 61 64 4f 6e 6c 79 20 | 61 6e 64 20 52 61 6e 64 |eadOnly |and Rand|
|00000730| 6f 6d 20 2a 29 0d 28 2a | 20 53 69 67 6e 61 74 75 |om *).(*| Signatu|
|00000740| 72 65 20 77 69 6c 6c 20 | 70 72 6f 62 61 62 6c 79 |re will |probably|
|00000750| 20 73 74 6f 70 20 77 6f | 72 6b 69 6e 67 2e 20 2a | stop wo|rking. *|
|00000760| 29 0d 0d 28 2a 20 49 66 | 20 79 6f 75 27 72 65 20 |)..(* If| you're |
|00000770| 69 6d 70 6c 65 6d 65 6e | 74 69 6e 67 20 61 20 63 |implemen|ting a c|
|00000780| 6f 6d 70 6f 6e 65 6e 74 | 20 6f 66 20 79 6f 75 72 |omponent| of your|
|00000790| 20 6f 77 6e 2c 20 49 20 | 73 74 72 6f 6e 67 6c 79 | own, I |strongly|
|000007a0| 20 73 75 67 67 65 73 74 | 20 2a 29 0d 28 2a 20 79 | suggest| *).(* y|
|000007b0| 6f 75 20 63 6f 6e 74 61 | 63 74 20 65 69 74 68 65 |ou conta|ct eithe|
|000007c0| 72 20 45 72 69 63 20 6f | 72 20 6d 79 73 65 6c 66 |r Eric o|r myself|
|000007d0| 20 66 69 72 73 74 2e 20 | 49 6e 20 61 6e 79 20 65 | first. |In any e|
|000007e0| 76 65 6e 74 2c 20 72 65 | 61 64 20 2a 29 0d 28 2a |vent, re|ad *).(*|
|000007f0| 20 74 68 65 20 73 65 63 | 74 69 6f 6e 20 6f 6e 20 | the sec|tion on |
|00000800| 74 68 65 20 63 6f 6d 70 | 6f 6e 65 6e 74 20 6d 61 |the comp|onent ma|
|00000810| 6e 61 67 65 72 20 69 6e | 20 49 6e 73 69 64 65 20 |nager in| Inside |
|00000820| 4d 61 63 69 6e 74 6f 73 | 68 3a 20 4d 6f 72 65 20 |Macintos|h: More |
|00000830| 2a 29 0d 28 2a 20 4d 61 | 63 69 6e 74 6f 73 68 20 |*).(* Ma|cintosh |
|00000840| 54 6f 6f 6c 62 6f 78 20 | 76 65 72 79 20 63 6c 6f |Toolbox |very clo|
|00000850| 73 65 6c 79 20 61 6e 64 | 20 74 65 73 74 20 79 6f |sely and| test yo|
|00000860| 75 72 20 63 6f 6d 70 6f | 6e 65 6e 74 20 74 68 6f |ur compo|nent tho|
|00000870| 72 6f 75 67 68 6c 79 2e | 20 2a 29 0d 28 2a 20 59 |roughly.| *).(* Y|
|00000880| 6f 75 27 6c 6c 20 64 65 | 66 69 6e 69 74 65 6c 79 |ou'll de|finitely|
|00000890| 20 77 61 6e 74 20 73 6f | 6d 65 20 74 6f 6f 6c 73 | want so|me tools|
|000008a0| 20 6f 66 66 20 6f 66 20 | 64 65 76 65 6c 6f 70 20 | off of |develop |
|000008b0| 31 35 2c 20 69 6e 63 6c | 75 64 69 6e 67 20 2a 29 |15, incl|uding *)|
|000008c0| 0d 28 2a 20 4b 6f 6d 70 | 6f 6e 65 6e 74 20 4b 69 |.(* Komp|onent Ki|
|000008d0| 6c 6c 65 72 2c 20 52 65 | 69 6e 73 74 61 6c 6c 65 |ller, Re|installe|
|000008e0| 72 20 49 49 20 61 6e 64 | 20 74 68 65 20 22 74 68 |r II and| the "th|
|000008f0| 69 6e 67 22 20 64 63 6d | 64 2e 20 2a 29 0d 0d 28 |ing" dcm|d. *)..(|
|00000900| 2a 20 54 68 69 73 20 63 | 6f 64 65 20 69 73 20 70 |* This c|ode is p|
|00000910| 72 6f 62 61 62 6c 79 20 | 6f 66 20 61 64 65 71 75 |robably |of adequ|
|00000920| 61 74 65 20 71 75 61 6c | 69 74 79 20 66 6f 72 20 |ate qual|ity for |
|00000930| 6d 6f 73 74 20 75 73 65 | 73 2c 20 62 75 74 20 69 |most use|s, but i|
|00000940| 66 20 2a 29 0d 28 2a 20 | 79 6f 75 20 61 72 65 20 |f *).(* |you are |
|00000950| 75 73 69 6e 67 20 69 74 | 20 74 6f 20 69 6d 70 6c |using it| to impl|
|00000960| 65 6d 65 6e 74 20 61 20 | 63 6f 6d 6d 65 72 63 69 |ement a |commerci|
|00000970| 61 6c 2d 71 75 61 6c 69 | 74 79 20 73 79 73 74 65 |al-quali|ty syste|
|00000980| 6d 2c 20 79 6f 75 20 2a | 29 0d 28 2a 20 6d 61 79 |m, you *|).(* may|
|00000990| 20 77 61 6e 74 20 74 6f | 20 72 65 77 72 69 74 65 | want to| rewrite|
|000009a0| 20 69 74 20 66 72 6f 6d | 20 74 68 65 20 67 72 6f | it from| the gro|
|000009b0| 75 6e 64 20 75 70 2e 20 | 2a 29 0d 0d 28 2a 20 51 |und up. |*)..(* Q|
|000009c0| 75 69 6e 6e 20 22 54 68 | 65 20 45 73 6b 69 6d 6f |uinn "Th|e Eskimo|
|000009d0| 21 22 20 2a 29 0d 0d 28 | 2a 20 77 69 74 68 20 76 |!" *)..(|* with v|
|000009e0| 61 73 74 20 70 6c 61 67 | 61 72 69 73 6d 20 66 72 |ast plag|arism fr|
|000009f0| 6f 6d 2e 2e 2e 20 2a 29 | 0d 0d 28 2a 20 45 72 69 |om... *)|..(* Eri|
|00000a00| 63 20 4b 69 64 64 20 2a | 29 0d 28 2a 20 65 72 69 |c Kidd *|).(* eri|
|00000a10| 63 2e 6b 69 64 64 40 64 | 61 72 74 6d 6f 75 74 68 |c.kidd@d|artmouth|
|00000a20| 2e 65 64 75 20 2a 29 0d | 0d 28 2a 20 54 68 61 6e |.edu *).|.(* Than|
|00000a30| 6b 73 20 66 6f 72 20 61 | 6c 6c 20 74 68 65 20 77 |ks for a|ll the w|
|00000a40| 6f 72 6b 20 45 72 69 63 | 21 20 2a 29 0d 0d 69 6e |ork Eric|! *)..in|
|00000a50| 74 65 72 66 61 63 65 0d | 0d 09 75 73 65 73 0d 09 |terface.|..uses..|
|00000a60| 09 43 6f 6d 70 6f 6e 65 | 6e 74 73 3b 0d 0d 09 66 |.Compone|nts;...f|
|00000a70| 75 6e 63 74 69 6f 6e 20 | 4d 61 69 6e 20 28 76 61 |unction |Main (va|
|00000a80| 72 20 70 61 72 61 6d 73 | 3a 20 43 6f 6d 70 6f 6e |r params|: Compon|
|00000a90| 65 6e 74 50 61 72 61 6d | 65 74 65 72 73 3b 20 73 |entParam|eters; s|
|00000aa0| 74 6f 72 61 67 65 3a 20 | 48 61 6e 64 6c 65 29 3a |torage: |Handle):|
|00000ab0| 20 43 6f 6d 70 6f 6e 65 | 6e 74 52 65 73 75 6c 74 | Compone|ntResult|
|00000ac0| 3b 0d 0d 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |;..imple|mentatio|
|00000ad0| 6e 0d 0d 09 75 73 65 73 | 0d 7b 24 69 66 63 20 75 |n...uses|.{$ifc u|
|00000ae0| 6e 64 65 66 69 6e 65 64 | 20 54 48 49 4e 4b 5f 50 |ndefined| THINK_P|
|00000af0| 61 73 63 61 6c 7d 0d 09 | 09 54 79 70 65 73 2c 20 |ascal}..|.Types, |
|00000b00| 46 69 6c 65 73 2c 20 51 | 75 69 63 6b 44 72 61 77 |Files, Q|uickDraw|
|00000b10| 2c 20 41 6c 69 61 73 65 | 73 2c 20 50 61 63 6b 61 |, Aliase|s, Packa|
|00000b20| 67 65 73 2c 20 4d 65 6d | 6f 72 79 2c 20 45 72 72 |ges, Mem|ory, Err|
|00000b30| 6f 72 73 2c 20 54 6f 6f | 6c 55 74 69 6c 73 2c 20 |ors, Too|lUtils, |
|00000b40| 52 65 73 6f 75 72 63 65 | 73 2c 20 0d 0d 09 09 49 |Resource|s, ....I|
|00000b50| 43 54 79 70 65 73 2c 20 | 0d 7b 24 65 6e 64 63 7d |CTypes, |.{$endc}|
|00000b60| 0d 09 09 46 6f 6c 64 65 | 72 73 2c 20 49 43 43 41 |...Folde|rs, ICCA|
|00000b70| 50 49 2c 20 49 43 4b 65 | 79 73 2c 20 49 43 43 6f |PI, ICKe|ys, ICCo|
|00000b80| 6d 70 6f 6e 65 6e 74 53 | 65 6c 65 63 74 6f 72 73 |mponentS|electors|
|00000b90| 2c 20 49 43 53 70 65 63 | 69 66 69 63 4f 76 65 72 |, ICSpec|ificOver|
|00000ba0| 72 69 64 65 3b 0d 0d 09 | 66 75 6e 63 74 69 6f 6e |ride;...|function|
|00000bb0| 20 49 43 47 4f 44 65 63 | 53 74 72 20 28 6c 3a 20 | ICGODec|Str (l: |
|00000bc0| 6c 6f 6e 67 69 6e 74 29 | 3a 20 53 74 72 33 32 3b |longint)|: Str32;|
|00000bd0| 0d 09 09 76 61 72 0d 09 | 09 09 74 6d 70 73 74 72 |...var..|..tmpstr|
|00000be0| 3a 20 53 74 72 32 35 35 | 3b 0d 09 62 65 67 69 6e |: Str255|;..begin|
|00000bf0| 0d 09 09 4e 75 6d 54 6f | 53 74 72 69 6e 67 28 6c |...NumTo|String(l|
|00000c00| 2c 20 74 6d 70 73 74 72 | 29 3b 0d 09 09 49 43 47 |, tmpstr|);...ICG|
|00000c10| 4f 44 65 63 53 74 72 20 | 3a 3d 20 74 6d 70 73 74 |ODecStr |:= tmpst|
|00000c20| 72 3b 0d 09 65 6e 64 3b | 20 28 2a 20 49 43 47 4f |r;..end;| (* ICGO|
|00000c30| 44 65 63 53 74 72 20 2a | 29 0d 0d 28 2a 20 20 49 |DecStr *|)..(* I|
|00000c40| 43 47 4f 46 69 78 43 6c | 6f 6e 65 52 65 66 43 6f |CGOFixCl|oneRefCo|
|00000c50| 6e 20 2a 29 0d 0d 28 2a | 20 53 65 65 20 49 6e 73 |n *)..(*| See Ins|
|00000c60| 69 64 65 20 4d 61 63 69 | 6e 74 6f 73 68 3a 20 4d |ide Maci|ntosh: M|
|00000c70| 6f 72 65 20 4d 61 63 69 | 6e 74 6f 73 68 20 54 6f |ore Maci|ntosh To|
|00000c80| 6f 6c 62 6f 78 20 70 2e | 20 36 2d 33 35 20 66 6f |olbox p.| 6-35 fo|
|00000c90| 72 20 2a 29 0d 28 2a 20 | 61 6e 20 6f 76 65 72 76 |r *).(* |an overv|
|00000ca0| 69 65 77 20 6f 66 20 74 | 68 69 73 20 73 69 6c 6c |iew of t|his sill|
|00000cb0| 69 6e 65 73 73 2e 20 49 | 74 20 73 65 65 6d 73 20 |iness. I|t seems |
|00000cc0| 74 68 61 74 20 77 68 65 | 6e 20 79 6f 75 72 20 67 |that whe|n your g|
|00000cd0| 6c 6f 62 61 6c 6c 79 2d | 20 2a 29 0d 28 2a 20 72 |lobally-| *).(* r|
|00000ce0| 65 67 69 73 74 65 72 65 | 64 20 63 6f 6d 70 6f 6e |egistere|d compon|
|00000cf0| 65 6e 74 20 69 73 20 6f | 70 65 6e 65 64 20 62 79 |ent is o|pened by|
|00000d00| 20 61 6e 20 61 70 70 6c | 69 63 61 74 69 6f 6e 2c | an appl|ication,|
|00000d10| 20 74 68 65 20 73 79 73 | 74 65 6d 20 2a 29 0d 28 | the sys|tem *).(|
|00000d20| 2a 20 70 75 6c 6c 73 20 | 61 20 66 61 73 74 20 6f |* pulls |a fast o|
|00000d30| 6e 65 20 75 6e 64 65 72 | 20 22 63 65 72 74 61 69 |ne under| "certai|
|00000d40| 6e 20 63 69 72 63 75 6d | 73 74 61 6e 63 65 73 22 |n circum|stances"|
|00000d50| 20 28 6e 6f 74 20 65 6e | 6f 75 67 68 20 6d 65 6d | (not en|ough mem|
|00000d60| 6f 72 79 20 2a 29 0d 28 | 2a 20 69 6e 20 74 68 65 |ory *).(|* in the|
|00000d70| 20 73 79 73 74 65 6d 20 | 68 65 61 70 29 20 61 6e | system |heap) an|
|00000d80| 64 20 22 63 6c 6f 6e 65 | 73 22 20 61 20 6c 6f 63 |d "clone|s" a loc|
|00000d90| 61 6c 6c 79 2d 72 65 67 | 69 73 74 65 72 65 64 20 |ally-reg|istered |
|00000da0| 76 65 72 73 69 6f 6e 20 | 2a 29 0d 28 2a 20 6f 66 |version |*).(* of|
|00000db0| 20 79 6f 75 72 20 63 6f | 6d 70 6f 6e 65 6e 74 2c | your co|mponent,|
|00000dc0| 20 66 72 79 69 6e 67 20 | 79 6f 75 72 20 52 65 66 | frying |your Ref|
|00000dd0| 43 6f 6e 20 69 6e 20 70 | 72 6f 63 65 73 73 2e 20 |Con in p|rocess. |
|00000de0| 2a 29 0d 0d 28 2a 20 57 | 68 61 74 20 77 65 20 6e |*)..(* W|hat we n|
|00000df0| 65 65 64 20 74 6f 20 64 | 6f 20 69 73 20 64 65 74 |eed to d|o is det|
|00000e00| 65 72 6d 69 6e 65 20 69 | 66 20 74 68 69 73 20 69 |ermine i|f this i|
|00000e10| 73 20 74 68 65 20 63 61 | 73 65 2c 20 61 6e 64 20 |s the ca|se, and |
|00000e20| 69 66 20 73 6f 2c 20 2a | 29 0d 28 2a 20 72 65 63 |if so, *|).(* rec|
|00000e30| 6f 76 65 72 20 74 68 65 | 20 52 65 66 43 6f 6e 20 |over the| RefCon |
|00000e40| 62 79 20 6c 6f 63 61 74 | 69 6e 67 20 74 68 65 20 |by locat|ing the |
|00000e50| 6f 72 69 67 69 6e 61 6c | 20 63 6f 70 79 20 6f 66 |original| copy of|
|00000e60| 20 74 68 65 20 63 6f 6d | 70 6f 6e 65 6e 74 2e 20 | the com|ponent. |
|00000e70| 2a 29 0d 0d 28 2a 20 54 | 68 65 20 4f 66 66 69 63 |*)..(* T|he Offic|
|00000e80| 69 61 6c 6c 79 20 53 61 | 63 74 69 6f 6e 65 64 20 |ially Sa|ctioned |
|00000e90| 57 61 79 20 74 6f 20 64 | 6f 20 74 68 69 73 20 69 |Way to d|o this i|
|00000ea0| 73 20 61 20 62 69 74 20 | 6f 66 20 61 20 68 61 63 |s a bit |of a hac|
|00000eb0| 6b 2e 20 47 6c 6f 62 61 | 6c 20 2a 29 0d 28 2a 20 |k. Globa|l *).(* |
|00000ec0| 63 6f 6d 70 6f 6e 65 6e | 74 73 20 68 61 76 65 20 |componen|ts have |
|00000ed0| 61 6e 20 41 35 20 77 6f | 72 6c 64 20 6f 66 20 7a |an A5 wo|rld of z|
|00000ee0| 65 72 6f 20 77 68 65 6e | 20 74 68 65 79 20 61 72 |ero when| they ar|
|00000ef0| 65 20 6f 70 65 6e 65 64 | 2c 20 62 75 74 20 6c 6f |e opened|, but lo|
|00000f00| 63 61 6c 20 2a 29 0d 28 | 2a 20 6f 6e 65 73 20 68 |cal *).(|* ones h|
|00000f10| 61 76 65 20 69 74 20 70 | 72 65 2d 73 65 74 20 74 |ave it p|re-set t|
|00000f20| 6f 20 74 68 65 20 70 61 | 72 65 6e 74 20 61 70 70 |o the pa|rent app|
|00000f30| 6c 69 63 61 74 69 6f 6e | 27 73 20 76 61 6c 75 65 |lication|'s value|
|00000f40| 2e 20 49 66 20 79 6f 75 | 72 20 2a 29 0d 28 2a 20 |. If you|r *).(* |
|00000f50| 73 75 70 70 6f 73 65 64 | 6c 79 20 67 6c 6f 62 61 |supposed|ly globa|
|00000f60| 6c 20 63 6f 6d 70 6f 6e | 65 6e 74 20 64 65 74 65 |l compon|ent dete|
|00000f70| 63 74 73 20 74 68 61 74 | 20 69 74 20 68 61 73 20 |cts that| it has |
|00000f80| 61 20 70 72 65 2d 73 65 | 74 20 41 35 20 77 6f 72 |a pre-se|t A5 wor|
|00000f90| 6c 64 2c 20 2a 29 0d 28 | 2a 20 74 68 65 6e 20 69 |ld, *).(|* then i|
|00000fa0| 74 27 73 20 62 65 65 6e | 20 63 6c 6f 6e 65 64 2e |t's been| cloned.|
|00000fb0| 20 2a 29 0d 0d 28 2a 20 | 54 6f 20 66 69 6e 64 20 | *)..(* |To find |
|00000fc0| 74 68 65 20 6f 72 69 67 | 69 6e 61 6c 20 63 6f 70 |the orig|inal cop|
|00000fd0| 79 20 6f 66 20 74 68 65 | 20 63 6f 6d 70 6f 6e 65 |y of the| compone|
|00000fe0| 6e 74 20 28 77 68 69 63 | 68 20 68 61 73 20 74 68 |nt (whic|h has th|
|00000ff0| 65 20 52 65 66 43 6f 6e | 20 77 65 20 2a 29 0d 28 |e RefCon| we *).(|
|00001000| 2a 20 6e 65 65 64 29 2c | 20 77 65 20 6e 65 65 64 |* need),| we need|
|00001010| 20 74 6f 20 66 69 6e 64 | 20 61 6e 6f 74 68 65 72 | to find| another|
|00001020| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 74 68 61 74 20 | compone|nt that |
|00001030| 6c 6f 6f 6b 73 20 65 78 | 61 63 74 6c 79 20 6c 69 |looks ex|actly li|
|00001040| 6b 65 20 75 73 2c 20 2a | 29 0d 28 2a 20 77 69 74 |ke us, *|).(* wit|
|00001050| 68 20 74 68 65 20 65 78 | 63 65 70 74 69 6f 6e 20 |h the ex|ception |
|00001060| 6f 66 20 61 20 64 69 66 | 66 65 72 65 6e 74 20 63 |of a dif|ferent c|
|00001070| 6f 6d 70 6f 6e 65 6e 74 | 20 69 64 65 6e 74 69 66 |omponent| identif|
|00001080| 69 65 72 2e 20 55 6e 6c | 65 73 73 20 77 65 27 76 |ier. Unl|ess we'v|
|00001090| 65 20 2a 29 0d 28 2a 20 | 62 65 65 6e 20 72 65 67 |e *).(* |been reg|
|000010a0| 69 73 74 65 72 65 64 20 | 67 6c 6f 62 61 6c 6c 79 |istered |globally|
|000010b0| 20 6d 75 6c 74 69 70 6c | 65 20 74 69 6d 65 73 20 | multipl|e times |
|000010c0| 75 6e 64 65 72 20 74 68 | 65 20 73 61 6d 65 20 6e |under th|e same n|
|000010d0| 61 6d 65 2c 20 74 68 69 | 73 20 2a 29 0d 28 2a 20 |ame, thi|s *).(* |
|000010e0| 73 68 6f 75 6c 64 20 77 | 6f 72 6b 2e 20 46 69 6e |should w|ork. Fin|
|000010f0| 64 4e 65 78 74 43 6f 6d | 70 6f 6e 65 6e 74 20 77 |dNextCom|ponent w|
|00001100| 69 6c 6c 20 64 6f 20 74 | 68 65 20 6a 6f 62 20 68 |ill do t|he job h|
|00001110| 65 72 65 2e 20 2a 29 0d | 0d 28 2a 20 54 68 65 20 |ere. *).|.(* The |
|00001120| 22 70 72 61 63 74 69 63 | 61 6c 20 75 70 73 68 6f |"practic|al upsho|
|00001130| 74 22 20 6f 66 20 74 68 | 69 73 3a 20 2a 29 0d 28 |t" of th|is: *).(|
|00001140| 2a 20 31 29 20 4f 6e 6c | 79 20 63 61 6c 6c 20 74 |* 1) Onl|y call t|
|00001150| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 77 68 65 6e |his rout|ine when|
|00001160| 20 68 61 6e 64 6c 69 6e | 67 20 6f 70 65 6e 20 6d | handlin|g open m|
|00001170| 65 73 73 61 67 65 73 20 | 2a 29 0d 28 2a 20 32 29 |essages |*).(* 2)|
|00001180| 20 43 61 6c 6c 20 69 74 | 20 62 65 66 6f 72 65 20 | Call it| before |
|00001190| 73 65 74 74 69 6e 67 20 | 79 6f 75 72 20 69 6e 73 |setting |your ins|
|000011a0| 74 61 6e 63 65 27 73 20 | 41 35 20 77 6f 72 6c 64 |tance's |A5 world|
|000011b0| 20 2a 29 0d 28 2a 20 33 | 29 20 4f 6e 6c 79 20 63 | *).(* 3|) Only c|
|000011c0| 61 6c 6c 20 69 74 20 69 | 66 20 79 6f 75 20 73 68 |all it i|f you sh|
|000011d0| 6f 75 6c 64 20 68 61 76 | 65 20 62 65 65 6e 20 67 |ould hav|e been g|
|000011e0| 6c 6f 62 61 6c 20 2a 29 | 0d 28 2a 20 34 29 20 49 |lobal *)|.(* 4) I|
|000011f0| 74 20 77 6f 6e 27 74 20 | 77 6f 72 6b 20 69 66 20 |t won't |work if |
|00001200| 79 6f 75 27 76 65 20 62 | 65 65 6e 20 72 65 67 69 |you've b|een regi|
|00001210| 73 74 65 72 65 64 20 6d | 75 6c 74 69 70 6c 65 20 |stered m|ultiple |
|00001220| 74 69 6d 65 73 20 2a 29 | 0d 28 2a 20 20 20 20 20 |times *)|.(* |
|00001230| 20 75 6e 64 65 72 20 74 | 68 65 20 73 61 6d 65 20 | under t|he same |
|00001240| 6e 61 6d 65 2e 20 2a 29 | 0d 28 2a 20 35 29 20 44 |name. *)|.(* 5) D|
|00001250| 6f 6e 27 74 20 75 73 65 | 20 74 68 65 20 73 61 6d |on't use| the sam|
|00001260| 65 20 6d 61 6e 75 66 61 | 63 74 75 72 65 72 20 63 |e manufa|cturer c|
|00001270| 6f 64 65 20 66 6f 72 20 | 64 69 66 66 65 72 65 6e |ode for |differen|
|00001280| 74 20 2a 29 0d 28 2a 20 | 20 20 20 20 20 63 6f 6d |t *).(* | com|
|00001290| 70 6f 6e 65 6e 74 73 20 | 77 69 74 68 20 74 68 65 |ponents |with the|
|000012a0| 20 73 61 6d 65 20 74 79 | 70 65 2f 73 75 62 74 79 | same ty|pe/subty|
|000012b0| 70 65 20 2a 29 0d 28 2a | 20 36 29 20 49 74 20 6d |pe *).(*| 6) It m|
|000012c0| 61 79 20 6e 6f 74 20 77 | 6f 72 6b 20 61 74 20 61 |ay not w|ork at a|
|000012d0| 6c 6c 2e 20 49 27 6d 20 | 61 20 63 6f 6c 6c 65 67 |ll. I'm |a colleg|
|000012e0| 65 20 73 74 75 64 65 6e | 74 2c 20 64 61 6d 6d 69 |e studen|t, dammi|
|000012f0| 74 2c 20 6e 6f 74 20 61 | 20 2a 29 0d 28 2a 20 20 |t, not a| *).(* |
|00001300| 20 20 20 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 20 | prog|ramming |
|00001310| 67 75 72 75 2e 20 2a 29 | 0d 0d 28 2a 20 45 72 69 |guru. *)|..(* Eri|
|00001320| 63 20 4b 69 64 64 20 2a | 29 0d 28 2a 20 65 72 69 |c Kidd *|).(* eri|
|00001330| 63 2e 6b 69 64 64 40 64 | 61 72 74 6d 6f 75 74 68 |c.kidd@d|artmouth|
|00001340| 2e 65 64 75 20 2a 29 0d | 28 2a 20 31 36 20 44 65 |.edu *).|(* 16 De|
|00001350| 63 20 39 34 20 2a 29 0d | 0d 09 66 75 6e 63 74 69 |c 94 *).|..functi|
|00001360| 6f 6e 20 49 43 47 4f 46 | 69 78 43 6c 6f 6e 65 52 |on ICGOF|ixCloneR|
|00001370| 65 66 43 6f 6e 20 28 73 | 65 6c 66 3a 20 43 6f 6d |efCon (s|elf: Com|
|00001380| 70 6f 6e 65 6e 74 49 6e | 73 74 61 6e 63 65 29 3a |ponentIn|stance):|
|00001390| 20 43 6f 6d 70 6f 6e 65 | 6e 74 52 65 73 75 6c 74 | Compone|ntResult|
|000013a0| 3b 0d 09 09 76 61 72 0d | 09 09 09 65 72 72 3a 20 |;...var.|...err: |
|000013b0| 4f 53 45 72 72 3b 0d 09 | 09 09 6a 75 6e 6b 3a 20 |OSErr;..|..junk: |
|000013c0| 4f 53 45 72 72 3b 0d 09 | 09 09 63 64 3a 20 43 6f |OSErr;..|..cd: Co|
|000013d0| 6d 70 6f 6e 65 6e 74 44 | 65 73 63 72 69 70 74 69 |mponentD|escripti|
|000013e0| 6f 6e 3b 0d 09 09 09 63 | 75 72 72 65 6e 74 3a 20 |on;....c|urrent: |
|000013f0| 43 6f 6d 70 6f 6e 65 6e | 74 3b 0d 09 62 65 67 69 |Componen|t;..begi|
|00001400| 6e 0d 09 09 65 72 72 20 | 3a 3d 20 6e 6f 45 72 72 |n...err |:= noErr|
|00001410| 3b 0d 09 09 69 66 20 28 | 47 65 74 43 6f 6d 70 6f |;...if (|GetCompo|
|00001420| 6e 65 6e 74 52 65 66 63 | 6f 6e 28 43 6f 6d 70 6f |nentRefc|on(Compo|
|00001430| 6e 65 6e 74 28 73 65 6c | 66 29 29 20 3d 20 30 29 |nent(sel|f)) = 0)|
|00001440| 20 26 20 28 47 65 74 43 | 6f 6d 70 6f 6e 65 6e 74 | & (GetC|omponent|
|00001450| 49 6e 73 74 61 6e 63 65 | 41 35 28 73 65 6c 66 29 |Instance|A5(self)|
|00001460| 20 3c 3e 20 30 29 20 74 | 68 65 6e 20 62 65 67 69 | <> 0) t|hen begi|
|00001470| 6e 0d 09 09 09 28 2a 20 | 69 66 20 74 68 69 73 20 |n....(* |if this |
|00001480| 63 6f 6d 70 6f 6e 65 6e | 74 20 68 61 73 20 6e 6f |componen|t has no|
|00001490| 74 20 62 65 65 6e 20 6f | 70 65 6e 65 64 20 26 20 |t been o|pened & |
|000014a0| 73 65 74 75 70 2a 29 0d | 09 09 09 28 2a 09 20 61 |setup*).|...(*. a|
|000014b0| 6e 64 20 77 65 27 76 65 | 20 62 65 65 6e 20 63 6c |nd we've| been cl|
|000014c0| 6f 6e 65 64 2a 29 0d 0d | 09 09 09 28 2a 20 67 65 |oned*)..|...(* ge|
|000014d0| 74 20 65 6e 6f 75 67 68 | 20 69 6e 66 6f 20 61 62 |t enough| info ab|
|000014e0| 6f 75 74 20 6f 75 72 73 | 65 6c 66 20 74 6f 20 72 |out ours|elf to r|
|000014f0| 65 63 6f 67 6e 69 7a 65 | 20 74 68 65 20 6f 72 69 |ecognize| the ori|
|00001500| 67 69 6e 61 6c 20 2a 29 | 0d 09 09 09 6a 75 6e 6b |ginal *)|....junk|
|00001510| 20 3a 3d 20 47 65 74 43 | 6f 6d 70 6f 6e 65 6e 74 | := GetC|omponent|
|00001520| 49 6e 66 6f 28 43 6f 6d | 70 6f 6e 65 6e 74 28 73 |Info(Com|ponent(s|
|00001530| 65 6c 66 29 2c 20 63 64 | 2c 20 6e 69 6c 2c 20 6e |elf), cd|, nil, n|
|00001540| 69 6c 2c 20 6e 69 6c 29 | 3b 0d 09 09 09 63 64 2e |il, nil)|;....cd.|
|00001550| 63 6f 6d 70 6f 6e 65 6e | 74 46 6c 61 67 73 4d 61 |componen|tFlagsMa|
|00001560| 73 6b 20 3a 3d 20 30 3b | 09 09 28 2a 20 74 68 65 |sk := 0;|..(* the|
|00001570| 73 65 20 73 68 6f 75 6c | 64 6e 27 74 20 62 65 20 |se shoul|dn't be |
|00001580| 72 65 6c 65 76 61 6e 74 | 20 2a 29 0d 0d 09 09 09 |relevant| *).....|
|00001590| 63 75 72 72 65 6e 74 20 | 3a 3d 20 6e 69 6c 3b 0d |current |:= nil;.|
|000015a0| 09 09 09 72 65 70 65 61 | 74 0d 09 09 09 09 28 2a |...repea|t.....(*|
|000015b0| 20 6c 6f 6f 70 20 75 6e | 74 69 6c 20 77 65 20 66 | loop un|til we f|
|000015c0| 69 6e 64 20 73 6f 6d 65 | 6f 6e 65 20 6f 74 68 65 |ind some|one othe|
|000015d0| 72 20 74 68 61 6e 20 6f | 75 72 73 65 6c 66 20 2a |r than o|urself *|
|000015e0| 29 0d 09 09 09 09 63 75 | 72 72 65 6e 74 20 3a 3d |).....cu|rrent :=|
|000015f0| 20 46 69 6e 64 4e 65 78 | 74 43 6f 6d 70 6f 6e 65 | FindNex|tCompone|
|00001600| 6e 74 28 63 75 72 72 65 | 6e 74 2c 20 63 64 29 3b |nt(curre|nt, cd);|
|00001610| 0d 09 09 09 75 6e 74 69 | 6c 20 63 75 72 72 65 6e |....unti|l curren|
|00001620| 74 20 3c 3e 20 43 6f 6d | 70 6f 6e 65 6e 74 28 73 |t <> Com|ponent(s|
|00001630| 65 6c 66 29 3b 0d 0d 09 | 09 09 28 2a 20 57 65 20 |elf);...|..(* We |
|00001640| 64 69 64 6e 27 74 20 66 | 69 6e 64 20 61 6e 79 20 |didn't f|ind any |
|00001650| 6f 72 69 67 69 6e 61 6c | 2d 2d 74 68 69 73 20 68 |original|--this h|
|00001660| 61 70 70 65 6e 73 20 6f | 66 74 65 6e 2e 2a 29 0d |appens o|ften.*).|
|00001670| 09 09 09 28 2a 20 49 66 | 20 77 65 27 76 65 20 62 |...(* If| we've b|
|00001680| 65 65 6e 20 63 61 70 74 | 75 72 65 64 2c 20 77 65 |een capt|ured, we|
|00001690| 20 63 61 6e 27 74 20 66 | 69 6e 64 20 74 68 65 20 | can't f|ind the |
|000016a0| 6f 72 69 67 69 6e 61 6c | 2a 29 0d 09 09 09 28 2a |original|*)....(*|
|000016b0| 09 20 63 6f 70 79 2e 20 | 42 65 73 74 20 74 68 69 |. copy. |Best thi|
|000016c0| 6e 67 20 74 6f 20 64 6f | 20 69 73 20 72 65 74 75 |ng to do| is retu|
|000016d0| 72 6e 20 61 6e 20 65 72 | 72 6f 72 2e 2a 29 0d 0d |rn an er|ror.*)..|
|000016e0| 09 09 09 69 66 20 63 75 | 72 72 65 6e 74 20 3d 20 |...if cu|rrent = |
|000016f0| 6e 69 6c 20 74 68 65 6e | 20 62 65 67 69 6e 0d 09 |nil then| begin..|
|00001700| 09 09 09 65 72 72 20 3a | 3d 20 70 61 72 61 6d 45 |...err :|= paramE|
|00001710| 72 72 3b 0d 09 09 09 65 | 6e 64 0d 09 09 09 65 6c |rr;....e|nd....el|
|00001720| 73 65 20 62 65 67 69 6e | 0d 09 09 09 09 53 65 74 |se begin|.....Set|
|00001730| 43 6f 6d 70 6f 6e 65 6e | 74 52 65 66 63 6f 6e 28 |Componen|tRefcon(|
|00001740| 43 6f 6d 70 6f 6e 65 6e | 74 28 73 65 6c 66 29 2c |Componen|t(self),|
|00001750| 20 47 65 74 43 6f 6d 70 | 6f 6e 65 6e 74 52 65 66 | GetComp|onentRef|
|00001760| 63 6f 6e 28 63 75 72 72 | 65 6e 74 29 29 3b 0d 09 |con(curr|ent));..|
|00001770| 09 09 65 6e 64 3b 20 28 | 2a 20 69 66 20 2a 29 0d |..end; (|* if *).|
|00001780| 09 09 65 6e 64 3b 20 28 | 2a 20 69 66 20 2a 29 0d |..end; (|* if *).|
|00001790| 09 09 49 43 47 4f 46 69 | 78 43 6c 6f 6e 65 52 65 |..ICGOFi|xCloneRe|
|000017a0| 66 43 6f 6e 20 3a 3d 20 | 65 72 72 3b 0d 09 65 6e |fCon := |err;..en|
|000017b0| 64 3b 20 28 2a 20 49 43 | 47 4f 46 69 78 43 6c 6f |d; (* IC|GOFixClo|
|000017c0| 6e 65 52 65 66 43 6f 6e | 20 2a 29 0d 0d 09 66 75 |neRefCon| *)...fu|
|000017d0| 6e 63 74 69 6f 6e 20 49 | 43 47 4f 47 65 74 53 68 |nction I|CGOGetSh|
|000017e0| 61 72 65 64 47 6c 6f 62 | 61 6c 73 20 28 67 6c 6f |aredGlob|als (glo|
|000017f0| 62 61 6c 73 3a 20 67 6c | 6f 62 61 6c 73 48 61 6e |bals: gl|obalsHan|
|00001800| 64 6c 65 29 3a 20 43 6f | 6d 70 6f 6e 65 6e 74 52 |dle): Co|mponentR|
|00001810| 65 73 75 6c 74 3b 0d 09 | 09 28 2a 20 49 66 20 74 |esult;..|.(* If t|
|00001820| 68 65 20 73 68 61 72 65 | 64 20 68 61 76 65 20 6e |he share|d have n|
|00001830| 6f 74 20 79 65 74 20 62 | 65 65 6e 20 61 6c 6c 6f |ot yet b|een allo|
|00001840| 63 61 74 65 64 2c 20 77 | 65 27 6c 6c 20 74 72 79 |cated, w|e'll try|
|00001850| 20 74 6f 20 73 65 74 20 | 74 68 65 6d 2a 29 0d 09 | to set |them*)..|
|00001860| 09 28 2a 20 75 70 20 61 | 6e 64 20 72 65 74 75 72 |.(* up a|nd retur|
|00001870| 6e 20 74 68 65 6d 2e 2a | 29 0d 09 09 76 61 72 0d |n them.*|)...var.|
|00001880| 09 09 09 65 72 72 3a 20 | 43 6f 6d 70 6f 6e 65 6e |...err: |Componen|
|00001890| 74 52 65 73 75 6c 74 3b | 0d 09 09 09 73 68 61 72 |tResult;|....shar|
|000018a0| 65 64 3a 20 73 68 61 72 | 65 64 47 6c 6f 62 61 6c |ed: shar|edGlobal|
|000018b0| 73 50 74 72 3b 0d 09 09 | 09 6a 75 6e 6b 3a 20 4f |sPtr;...|.junk: O|
|000018c0| 53 45 72 72 3b 0d 09 62 | 65 67 69 6e 0d 09 09 73 |SErr;..b|egin...s|
|000018d0| 68 61 72 65 64 20 3a 3d | 20 73 68 61 72 65 64 47 |hared :=| sharedG|
|000018e0| 6c 6f 62 61 6c 73 50 74 | 72 28 47 65 74 43 6f 6d |lobalsPt|r(GetCom|
|000018f0| 70 6f 6e 65 6e 74 52 65 | 66 63 6f 6e 28 43 6f 6d |ponentRe|fcon(Com|
|00001900| 70 6f 6e 65 6e 74 28 67 | 6c 6f 62 61 6c 73 5e 5e |ponent(g|lobals^^|
|00001910| 2e 73 65 6c 66 29 29 29 | 3b 0d 09 09 67 6c 6f 62 |.self)))|;...glob|
|00001920| 61 6c 73 5e 5e 2e 73 68 | 61 72 65 64 20 3a 3d 20 |als^^.sh|ared := |
|00001930| 73 68 61 72 65 64 3b 0d | 09 09 69 66 20 73 68 61 |shared;.|..if sha|
|00001940| 72 65 64 20 3d 20 6e 69 | 6c 20 74 68 65 6e 20 62 |red = ni|l then b|
|00001950| 65 67 69 6e 0d 09 09 09 | 73 68 61 72 65 64 20 3a |egin....|shared :|
|00001960| 3d 20 73 68 61 72 65 64 | 47 6c 6f 62 61 6c 73 50 |= shared|GlobalsP|
|00001970| 74 72 28 4e 65 77 50 74 | 72 53 79 73 43 6c 65 61 |tr(NewPt|rSysClea|
|00001980| 72 28 73 69 7a 65 6f 66 | 28 73 68 61 72 65 64 47 |r(sizeof|(sharedG|
|00001990| 6c 6f 62 61 6c 73 29 29 | 29 3b 0d 09 09 09 65 72 |lobals))|);....er|
|000019a0| 72 20 3a 3d 20 4d 65 6d | 45 72 72 6f 72 3b 0d 09 |r := Mem|Error;..|
|000019b0| 09 09 69 66 20 65 72 72 | 20 3d 20 6e 6f 45 72 72 |..if err| = noErr|
|000019c0| 20 74 68 65 6e 20 62 65 | 67 69 6e 0d 09 09 09 09 | then be|gin.....|
|000019d0| 67 6c 6f 62 61 6c 73 5e | 5e 2e 73 68 61 72 65 64 |globals^|^.shared|
|000019e0| 20 3a 3d 20 73 68 61 72 | 65 64 3b 0d 09 09 09 09 | := shar|ed;.....|
|000019f0| 28 2a 20 69 6e 69 74 20 | 6f 75 72 20 70 61 72 74 |(* init |our part|
|00001a00| 20 6f 66 20 74 68 65 20 | 73 68 61 72 65 64 20 67 | of the |shared g|
|00001a10| 6c 6f 62 61 6c 73 20 2a | 29 0d 09 09 09 09 73 68 |lobals *|).....sh|
|00001a20| 61 72 65 64 5e 2e 64 65 | 6c 65 67 61 74 65 20 3a |ared^.de|legate :|
|00001a30| 3d 20 6e 69 6c 3b 0d 09 | 09 09 09 28 2a 20 61 6e |= nil;..|...(* an|
|00001a40| 64 20 72 65 6d 65 6d 62 | 65 72 20 74 68 65 20 73 |d rememb|er the s|
|00001a50| 68 61 72 65 64 20 67 6c | 6f 62 61 6c 73 20 69 6e |hared gl|obals in|
|00001a60| 20 6f 75 72 20 72 65 66 | 63 6f 6e 20 2a 29 0d 09 | our ref|con *)..|
|00001a70| 09 09 09 53 65 74 43 6f | 6d 70 6f 6e 65 6e 74 52 |...SetCo|mponentR|
|00001a80| 65 66 63 6f 6e 28 43 6f | 6d 70 6f 6e 65 6e 74 28 |efcon(Co|mponent(|
|00001a90| 67 6c 6f 62 61 6c 73 5e | 5e 2e 73 65 6c 66 29 2c |globals^|^.self),|
|00001aa0| 20 6c 6f 6e 67 69 6e 74 | 28 73 68 61 72 65 64 29 | longint|(shared)|
|00001ab0| 29 3b 0d 0d 09 09 09 09 | 28 2a 20 53 69 6e 63 65 |);......|(* Since|
|00001ac0| 20 6f 75 72 20 73 68 61 | 72 65 64 20 67 6c 6f 62 | our sha|red glob|
|00001ad0| 61 6c 73 20 67 65 74 20 | 73 65 74 20 75 70 20 6f |als get |set up o|
|00001ae0| 6e 6c 79 20 6f 6e 63 65 | 20 61 74 20 72 65 67 69 |nly once| at regi|
|00001af0| 73 74 72 61 74 69 6f 6e | 2a 29 0d 09 09 09 09 28 |stration|*).....(|
|00001b00| 2a 20 74 69 6d 65 2c 20 | 68 65 72 65 27 73 20 74 |* time, |here's t|
|00001b10| 68 65 20 70 65 72 66 65 | 63 74 20 70 6c 61 63 65 |he perfe|ct place|
|00001b20| 20 74 6f 20 6d 6f 76 65 | 20 6f 75 72 73 65 6c 76 | to move| ourselv|
|00001b30| 65 73 20 74 6f 20 74 68 | 65 2a 29 0d 09 09 09 09 |es to th|e*).....|
|00001b40| 28 2a 20 64 65 66 61 75 | 6c 74 20 70 6f 73 69 74 |(* defau|lt posit|
|00001b50| 69 6f 6e 20 6f 6e 20 74 | 68 65 20 63 6f 6d 70 6f |ion on t|he compo|
|00001b60| 6e 65 6e 74 20 6c 69 73 | 74 20 2a 29 0d 09 09 09 |nent lis|t *)....|
|00001b70| 09 65 72 72 20 3a 3d 20 | 53 65 74 44 65 66 61 75 |.err := |SetDefau|
|00001b80| 6c 74 43 6f 6d 70 6f 6e | 65 6e 74 28 43 6f 6d 70 |ltCompon|ent(Comp|
|00001b90| 6f 6e 65 6e 74 28 67 6c | 6f 62 61 6c 73 5e 5e 2e |onent(gl|obals^^.|
|00001ba0| 73 65 6c 66 29 2c 20 64 | 65 66 61 75 6c 74 43 6f |self), d|efaultCo|
|00001bb0| 6d 70 6f 6e 65 6e 74 49 | 64 65 6e 74 69 63 61 6c |mponentI|dentical|
|00001bc0| 20 2b 20 64 65 66 61 75 | 6c 74 43 6f 6d 70 6f 6e | + defau|ltCompon|
|00001bd0| 65 6e 74 41 6e 79 46 6c | 61 67 73 41 6e 79 4d 61 |entAnyFl|agsAnyMa|
|00001be0| 6e 75 66 61 63 74 75 72 | 65 72 29 3b 0d 09 09 09 |nufactur|er);....|
|00001bf0| 65 6e 64 3b 20 28 2a 20 | 69 66 20 2a 29 0d 09 09 |end; (* |if *)...|
|00001c00| 09 28 2a 20 61 6e 64 20 | 69 6e 69 74 20 74 68 65 |.(* and |init the|
|00001c10| 20 73 70 65 63 69 66 69 | 63 20 67 6c 6f 62 61 6c | specifi|c global|
|00001c20| 73 20 2a 29 0d 09 09 09 | 69 66 20 65 72 72 20 3d |s *)....|if err =|
|00001c30| 20 6e 6f 45 72 72 20 74 | 68 65 6e 20 62 65 67 69 | noErr t|hen begi|
|00001c40| 6e 0d 09 09 09 09 6a 75 | 6e 6b 20 3a 3d 20 49 43 |n.....ju|nk := IC|
|00001c50| 53 4f 49 6e 69 74 53 68 | 61 72 65 64 28 67 6c 6f |SOInitSh|ared(glo|
|00001c60| 62 61 6c 73 29 3b 0d 09 | 09 09 65 6e 64 3b 20 28 |bals);..|..end; (|
|00001c70| 2a 20 69 66 20 2a 29 0d | 09 09 65 6e 64 3b 20 28 |* if *).|..end; (|
|00001c80| 2a 20 69 66 20 2a 29 0d | 0d 09 09 49 43 47 4f 47 |* if *).|...ICGOG|
|00001c90| 65 74 53 68 61 72 65 64 | 47 6c 6f 62 61 6c 73 20 |etShared|Globals |
|00001ca0| 3a 3d 20 65 72 72 3b 0d | 09 65 6e 64 3b 20 28 2a |:= err;.|.end; (*|
|00001cb0| 20 49 43 47 4f 47 65 74 | 53 68 61 72 65 64 47 6c | ICGOGet|SharedGl|
|00001cc0| 6f 62 61 6c 73 20 2a 29 | 0d 0d 28 2a 20 43 6f 6d |obals *)|..(* Com|
|00001cd0| 70 6f 6e 65 6e 74 20 4d | 61 6e 61 67 65 72 20 72 |ponent M|anager r|
|00001ce0| 6f 75 74 69 6e 65 73 20 | 2a 29 0d 0d 09 66 75 6e |outines |*)...fun|
|00001cf0| 63 74 69 6f 6e 20 49 43 | 47 4f 52 65 67 69 73 74 |ction IC|GORegist|
|00001d00| 65 72 20 28 67 6c 6f 62 | 61 6c 73 3a 20 67 6c 6f |er (glob|als: glo|
|00001d10| 62 61 6c 73 48 61 6e 64 | 6c 65 29 3a 20 43 6f 6d |balsHand|le): Com|
|00001d20| 70 6f 6e 65 6e 74 52 65 | 73 75 6c 74 3b 0d 09 09 |ponentRe|sult;...|
|00001d30| 28 2a 20 49 27 64 20 6c | 6f 76 65 20 74 6f 20 61 |(* I'd l|ove to a|
|00001d40| 6c 6c 6f 63 61 74 65 20 | 73 68 61 72 65 64 20 67 |llocate |shared g|
|00001d50| 6c 6f 62 61 6c 73 20 68 | 65 72 65 2c 20 62 75 74 |lobals h|ere, but|
|00001d60| 20 63 65 72 74 61 69 6e | 20 2a 29 0d 09 09 28 2a | certain| *)...(*|
|00001d70| 09 20 76 65 72 73 69 6f | 6e 73 20 6f 66 20 74 68 |. versio|ns of th|
|00001d80| 65 20 43 6f 6d 70 6f 6e | 65 6e 74 20 4d 61 6e 61 |e Compon|ent Mana|
|00001d90| 67 65 72 20 64 6f 6e 27 | 74 20 63 61 6c 6c 20 49 |ger don'|t call I|
|00001da0| 43 47 4f 52 65 67 69 73 | 74 65 72 2e 20 2a 29 0d |CGORegis|ter. *).|
|00001db0| 09 09 28 2a 09 20 41 64 | 64 69 74 69 6f 6e 61 6c |..(*. Ad|ditional|
|00001dc0| 6c 79 2c 20 63 61 6c 6c | 73 20 74 6f 20 49 43 47 |ly, call|s to ICG|
|00001dd0| 4f 4f 70 65 6e 20 61 6e | 64 20 49 43 47 4f 43 6c |OOpen an|d ICGOCl|
|00001de0| 6f 73 65 20 62 72 61 63 | 6b 65 74 20 2a 29 0d 09 |ose brac|ket *)..|
|00001df0| 09 28 2a 09 20 74 68 65 | 20 63 61 6c 6c 20 69 66 |.(*. the| call if|
|00001e00| 20 69 74 20 64 6f 65 73 | 20 67 65 74 20 6d 61 64 | it does| get mad|
|00001e10| 65 2e 20 47 6f 20 66 69 | 67 75 72 65 2e 20 2a 29 |e. Go fi|gure. *)|
|00001e20| 0d 0d 09 09 28 2a 20 57 | 65 20 61 63 74 75 61 6c |....(* W|e actual|
|00001e30| 6c 79 20 72 65 74 75 72 | 6e 20 61 20 42 6f 6f 6c |ly retur|n a Bool|
|00001e40| 65 61 6e 20 76 61 6c 75 | 65 2c 20 66 61 6c 73 65 |ean valu|e, false|
|00001e50| 20 69 66 20 77 65 20 73 | 68 6f 75 6c 64 20 62 65 | if we s|hould be|
|00001e60| 2a 29 0d 09 09 28 2a 20 | 72 65 67 69 73 74 65 72 |*)...(* |register|
|00001e70| 65 64 20 61 6e 64 20 74 | 72 75 65 20 69 66 20 77 |ed and t|rue if w|
|00001e80| 65 20 73 68 6f 75 6c 64 | 6e 27 74 2e 2a 29 0d 09 |e should|n't.*)..|
|00001e90| 62 65 67 69 6e 0d 09 09 | 49 43 47 4f 52 65 67 69 |begin...|ICGORegi|
|00001ea0| 73 74 65 72 20 3a 3d 20 | 30 3b 0d 09 65 6e 64 3b |ster := |0;..end;|
|00001eb0| 20 28 2a 20 49 43 47 4f | 52 65 67 69 73 74 65 72 | (* ICGO|Register|
|00001ec0| 20 2a 29 0d 0d 09 66 75 | 6e 63 74 69 6f 6e 20 49 | *)...fu|nction I|
|00001ed0| 43 47 4f 55 6e 72 65 67 | 69 73 74 65 72 20 28 67 |CGOUnreg|ister (g|
|00001ee0| 6c 6f 62 61 6c 73 3a 20 | 67 6c 6f 62 61 6c 73 48 |lobals: |globalsH|
|00001ef0| 61 6e 64 6c 65 29 3a 20 | 43 6f 6d 70 6f 6e 65 6e |andle): |Componen|
|00001f00| 74 52 65 73 75 6c 74 3b | 0d 09 09 28 2a 20 45 72 |tResult;|...(* Er|
|00001f10| 69 63 27 73 20 63 6f 6d | 6d 65 6e 74 3a 20 2a 29 |ic's com|ment: *)|
|00001f20| 0d 09 09 28 2a 20 20 20 | 44 6f 65 73 20 74 68 69 |...(* |Does thi|
|00001f30| 73 20 62 72 65 61 6b 20 | 69 66 20 77 65 27 76 65 |s break |if we've|
|00001f40| 20 62 65 65 6e 20 63 6c | 6f 6e 65 64 3f 20 44 6f | been cl|oned? Do|
|00001f50| 65 73 20 74 68 65 20 63 | 6c 6f 6e 65 20 2a 29 0d |es the c|lone *).|
|00001f60| 09 09 28 2a 09 20 20 20 | 67 65 74 20 75 6e 72 65 |..(*. |get unre|
|00001f70| 67 69 73 74 65 72 65 64 | 20 73 65 70 65 72 61 74 |gistered| seperat|
|00001f80| 65 6c 79 20 61 6e 64 20 | 64 6f 75 62 6c 65 20 64 |ely and |double d|
|00001f90| 69 73 70 6f 73 65 3f 20 | 48 6d 6d 2e 20 2a 29 0d |ispose? |Hmm. *).|
|00001fa0| 09 09 28 2a 20 46 49 49 | 4b 20 29 2d 3a 20 2a 29 |..(* FII|K )-: *)|
|00001fb0| 0d 09 09 76 61 72 0d 09 | 09 09 72 65 73 75 6c 74 |...var..|..result|
|00001fc0| 3a 20 43 6f 6d 70 6f 6e | 65 6e 74 52 65 73 75 6c |: Compon|entResul|
|00001fd0| 74 3b 0d 09 09 09 72 65 | 73 75 6c 74 32 3a 20 43 |t;....re|sult2: C|
|00001fe0| 6f 6d 70 6f 6e 65 6e 74 | 52 65 73 75 6c 74 3b 0d |omponent|Result;.|
|00001ff0| 09 62 65 67 69 6e 0d 09 | 09 72 65 73 75 6c 74 20 |.begin..|.result |
|00002000| 3a 3d 20 2d 31 3b 0d 09 | 09 69 66 20 67 6c 6f 62 |:= -1;..|.if glob|
|00002010| 61 6c 73 5e 5e 2e 73 68 | 61 72 65 64 20 3c 3e 20 |als^^.sh|ared <> |
|00002020| 6e 69 6c 20 74 68 65 6e | 20 62 65 67 69 6e 0d 09 |nil then| begin..|
|00002030| 09 09 28 2a 20 67 69 76 | 65 20 74 68 65 20 73 70 |..(* giv|e the sp|
|00002040| 65 63 69 66 69 63 73 20 | 6f 70 70 6f 72 74 75 6e |ecifics |opportun|
|00002050| 69 74 79 20 74 6f 20 63 | 6c 65 61 6e 20 75 70 20 |ity to c|lean up |
|00002060| 69 74 73 20 73 68 61 72 | 65 64 20 67 6c 6f 62 61 |its shar|ed globa|
|00002070| 6c 73 20 2a 29 0d 09 09 | 09 72 65 73 75 6c 74 20 |ls *)...|.result |
|00002080| 3a 3d 20 49 43 53 4f 43 | 6c 65 61 6e 53 68 61 72 |:= ICSOC|leanShar|
|00002090| 65 64 28 67 6c 6f 62 61 | 6c 73 29 3b 0d 09 09 09 |ed(globa|ls);....|
|000020a0| 28 2a 20 63 6c 65 61 6e | 20 75 70 20 6f 75 72 20 |(* clean| up our |
|000020b0| 70 61 72 74 20 6f 66 20 | 74 68 65 20 73 68 61 72 |part of |the shar|
|000020c0| 65 64 20 67 6c 6f 62 61 | 6c 73 20 2a 29 0d 09 09 |ed globa|ls *)...|
|000020d0| 09 72 65 73 75 6c 74 32 | 20 3a 3d 20 55 6e 63 61 |.result2| := Unca|
|000020e0| 70 74 75 72 65 43 6f 6d | 70 6f 6e 65 6e 74 28 67 |ptureCom|ponent(g|
|000020f0| 6c 6f 62 61 6c 73 5e 5e | 2e 73 68 61 72 65 64 5e |lobals^^|.shared^|
|00002100| 2e 64 65 6c 65 67 61 74 | 65 29 3b 0d 09 09 09 69 |.delegat|e);....i|
|00002110| 66 20 72 65 73 75 6c 74 | 20 3d 20 6e 6f 45 72 72 |f result| = noErr|
|00002120| 20 74 68 65 6e 20 62 65 | 67 69 6e 0d 09 09 09 09 | then be|gin.....|
|00002130| 72 65 73 75 6c 74 20 3a | 3d 20 72 65 73 75 6c 74 |result :|= result|
|00002140| 32 3b 0d 09 09 09 65 6e | 64 3b 20 28 2a 20 69 66 |2;....en|d; (* if|
|00002150| 20 2a 29 0d 09 09 09 28 | 2a 20 64 69 73 70 6f 73 | *)....(|* dispos|
|00002160| 65 20 6f 66 20 74 68 65 | 20 73 68 61 72 65 64 20 |e of the| shared |
|00002170| 67 6c 6f 62 61 6c 73 20 | 61 6e 64 20 73 65 74 20 |globals |and set |
|00002180| 6f 75 72 20 72 65 66 63 | 6f 6e 20 62 61 63 6b 20 |our refc|on back |
|00002190| 74 6f 20 6e 69 6c 20 2a | 29 0d 09 09 09 44 69 73 |to nil *|)....Dis|
|000021a0| 70 6f 73 65 50 74 72 28 | 50 74 72 28 67 6c 6f 62 |posePtr(|Ptr(glob|
|000021b0| 61 6c 73 5e 5e 2e 73 68 | 61 72 65 64 29 29 3b 0d |als^^.sh|ared));.|
|000021c0| 09 09 09 67 6c 6f 62 61 | 6c 73 5e 5e 2e 73 68 61 |...globa|ls^^.sha|
|000021d0| 72 65 64 20 3a 3d 20 6e | 69 6c 3b 0d 09 09 09 53 |red := n|il;....S|
|000021e0| 65 74 43 6f 6d 70 6f 6e | 65 6e 74 52 65 66 63 6f |etCompon|entRefco|
|000021f0| 6e 28 43 6f 6d 70 6f 6e | 65 6e 74 28 67 6c 6f 62 |n(Compon|ent(glob|
|00002200| 61 6c 73 5e 5e 2e 73 65 | 6c 66 29 2c 20 30 29 3b |als^^.se|lf), 0);|
|00002210| 0d 09 09 65 6e 64 3b 20 | 28 2a 20 69 66 20 2a 29 |...end; |(* if *)|
|00002220| 0d 09 09 49 43 47 4f 55 | 6e 72 65 67 69 73 74 65 |...ICGOU|nregiste|
|00002230| 72 20 3a 3d 20 72 65 73 | 75 6c 74 3b 0d 09 65 6e |r := res|ult;..en|
|00002240| 64 3b 20 28 2a 20 49 43 | 47 4f 55 6e 72 65 67 69 |d; (* IC|GOUnregi|
|00002250| 73 74 65 72 20 2a 29 0d | 0d 09 66 75 6e 63 74 69 |ster *).|..functi|
|00002260| 6f 6e 20 49 43 47 4f 43 | 61 6e 44 6f 20 28 67 6c |on ICGOC|anDo (gl|
|00002270| 6f 62 61 6c 73 3a 20 67 | 6c 6f 62 61 6c 73 48 61 |obals: g|lobalsHa|
|00002280| 6e 64 6c 65 3b 20 73 65 | 6c 65 63 74 6f 72 3a 20 |ndle; se|lector: |
|00002290| 69 6e 74 65 67 65 72 29 | 3a 20 43 6f 6d 70 6f 6e |integer)|: Compon|
|000022a0| 65 6e 74 52 65 73 75 6c | 74 3b 0d 09 28 2a 20 48 |entResul|t;..(* H|
|000022b0| 61 6e 64 6c 65 20 74 68 | 65 20 43 6f 6d 70 6f 6e |andle th|e Compon|
|000022c0| 65 6e 74 20 4d 61 6e 61 | 67 65 72 20 43 61 6e 44 |ent Mana|ger CanD|
|000022d0| 6f 20 72 65 71 75 65 73 | 74 2e 2a 29 0d 09 09 76 |o reques|t.*)...v|
|000022e0| 61 72 0d 09 09 09 72 65 | 73 75 6c 74 3a 20 43 6f |ar....re|sult: Co|
|000022f0| 6d 70 6f 6e 65 6e 74 52 | 65 73 75 6c 74 3b 0d 09 |mponentR|esult;..|
|00002300| 62 65 67 69 6e 0d 09 09 | 63 61 73 65 20 73 65 6c |begin...|case sel|
|00002310| 65 63 74 6f 72 20 6f 66 | 0d 09 09 09 6b 43 6f 6d |ector of|....kCom|
|00002320| 70 6f 6e 65 6e 74 55 6e | 72 65 67 69 73 74 65 72 |ponentUn|register|
|00002330| 53 65 6c 65 63 74 2e 2e | 6b 43 6f 6d 70 6f 6e 65 |Select..|kCompone|
|00002340| 6e 74 4f 70 65 6e 53 65 | 6c 65 63 74 3a 20 0d 09 |ntOpenSe|lect: ..|
|00002350| 09 09 09 72 65 73 75 6c | 74 20 3a 3d 20 31 3b 0d |...resul|t := 1;.|
|00002360| 09 09 09 6f 74 68 65 72 | 77 69 73 65 20 62 65 67 |...other|wise beg|
|00002370| 69 6e 0d 09 09 09 09 72 | 65 73 75 6c 74 20 3a 3d |in.....r|esult :=|
|00002380| 20 49 43 53 4f 43 61 6e | 44 6f 28 67 6c 6f 62 61 | ICSOCan|Do(globa|
|00002390| 6c 73 2c 20 73 65 6c 65 | 63 74 6f 72 29 3b 0d 09 |ls, sele|ctor);..|
|000023a0| 09 09 09 69 66 20 72 65 | 73 75 6c 74 20 3d 20 64 |...if re|sult = d|
|000023b0| 65 6c 65 67 61 74 65 54 | 68 69 73 43 61 6c 6c 45 |elegateT|hisCallE|
|000023c0| 72 72 20 74 68 65 6e 20 | 62 65 67 69 6e 0d 09 09 |rr then |begin...|
|000023d0| 09 09 09 72 65 73 75 6c | 74 20 3a 3d 20 43 6f 6d |...resul|t := Com|
|000023e0| 70 6f 6e 65 6e 74 46 75 | 6e 63 74 69 6f 6e 49 6d |ponentFu|nctionIm|
|000023f0| 70 6c 65 6d 65 6e 74 65 | 64 28 67 6c 6f 62 61 6c |plemente|d(global|
|00002400| 73 5e 5e 2e 64 65 6c 65 | 67 61 74 65 2c 20 73 65 |s^^.dele|gate, se|
|00002410| 6c 65 63 74 6f 72 29 3b | 0d 09 09 09 09 65 6e 64 |lector);|.....end|
|00002420| 0d 09 09 09 09 65 6c 73 | 65 20 62 65 67 69 6e 0d |.....els|e begin.|
|00002430| 09 09 09 09 09 72 65 73 | 75 6c 74 20 3a 3d 20 72 |.....res|ult := r|
|00002440| 65 73 75 6c 74 20 2b 20 | 31 3b 0d 09 09 09 09 65 |esult + |1;.....e|
|00002450| 6e 64 3b 20 28 2a 20 69 | 66 20 2a 29 0d 09 09 09 |nd; (* i|f *)....|
|00002460| 65 6e 64 3b 0d 09 09 65 | 6e 64 3b 20 28 2a 20 63 |end;...e|nd; (* c|
|00002470| 61 73 65 20 2a 29 0d 09 | 09 49 43 47 4f 43 61 6e |ase *)..|.ICGOCan|
|00002480| 44 6f 20 3a 3d 20 72 65 | 73 75 6c 74 3b 0d 09 65 |Do := re|sult;..e|
|00002490| 6e 64 3b 20 28 2a 20 49 | 43 47 4f 43 61 6e 44 6f |nd; (* I|CGOCanDo|
|000024a0| 20 2a 29 0d 0d 09 66 75 | 6e 63 74 69 6f 6e 20 49 | *)...fu|nction I|
|000024b0| 43 47 4f 46 69 6e 64 44 | 65 6c 65 67 61 74 65 20 |CGOFindD|elegate |
|000024c0| 28 61 66 74 65 72 3a 20 | 43 6f 6d 70 6f 6e 65 6e |(after: |Componen|
|000024d0| 74 29 3a 20 43 6f 6d 70 | 6f 6e 65 6e 74 3b 0d 09 |t): Comp|onent;..|
|000024e0| 09 76 61 72 0d 09 09 09 | 63 64 3a 20 43 6f 6d 70 |.var....|cd: Comp|
|000024f0| 6f 6e 65 6e 74 44 65 73 | 63 72 69 70 74 69 6f 6e |onentDes|cription|
|00002500| 3b 0d 09 09 09 66 6f 75 | 6e 64 5f 63 64 3a 20 43 |;....fou|nd_cd: C|
|00002510| 6f 6d 70 6f 6e 65 6e 74 | 44 65 73 63 72 69 70 74 |omponent|Descript|
|00002520| 69 6f 6e 3b 0d 09 09 09 | 63 75 72 72 65 6e 74 3a |ion;....|current:|
|00002530| 20 43 6f 6d 70 6f 6e 65 | 6e 74 3b 0d 09 09 09 66 | Compone|nt;....f|
|00002540| 6f 75 6e 64 3a 20 62 6f | 6f 6c 65 61 6e 3b 0d 09 |ound: bo|olean;..|
|00002550| 62 65 67 69 6e 0d 09 09 | 63 64 2e 63 6f 6d 70 6f |begin...|cd.compo|
|00002560| 6e 65 6e 74 54 79 70 65 | 20 3a 3d 20 69 6e 74 65 |nentType| := inte|
|00002570| 72 6e 65 74 43 6f 6e 66 | 69 67 75 72 61 74 69 6f |rnetConf|iguratio|
|00002580| 6e 43 6f 6d 70 6f 6e 65 | 6e 74 54 79 70 65 3b 0d |nCompone|ntType;.|
|00002590| 09 09 63 64 2e 63 6f 6d | 70 6f 6e 65 6e 74 53 75 |..cd.com|ponentSu|
|000025a0| 62 54 79 70 65 20 3a 3d | 20 69 6e 74 65 72 6e 65 |bType :=| interne|
|000025b0| 74 43 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 43 6f |tConfigu|rationCo|
|000025c0| 6d 70 6f 6e 65 6e 74 53 | 75 62 54 79 70 65 3b 0d |mponentS|ubType;.|
|000025d0| 09 09 63 64 2e 63 6f 6d | 70 6f 6e 65 6e 74 4d 61 |..cd.com|ponentMa|
|000025e0| 6e 75 66 61 63 74 75 72 | 65 72 20 3a 3d 20 4f 53 |nufactur|er := OS|
|000025f0| 54 79 70 65 28 30 29 3b | 0d 09 09 63 64 2e 63 6f |Type(0);|...cd.co|
|00002600| 6d 70 6f 6e 65 6e 74 46 | 6c 61 67 73 20 3a 3d 20 |mponentF|lags := |
|00002610| 30 3b 0d 09 09 63 64 2e | 63 6f 6d 70 6f 6e 65 6e |0;...cd.|componen|
|00002620| 74 46 6c 61 67 73 4d 61 | 73 6b 20 3a 3d 20 30 3b |tFlagsMa|sk := 0;|
|00002630| 0d 09 09 63 75 72 72 65 | 6e 74 20 3a 3d 20 61 66 |...curre|nt := af|
|00002640| 74 65 72 3b 0d 09 09 66 | 6f 75 6e 64 20 3a 3d 20 |ter;...f|ound := |
|00002650| 66 61 6c 73 65 3b 0d 09 | 09 72 65 70 65 61 74 0d |false;..|.repeat.|
|00002660| 09 09 09 63 75 72 72 65 | 6e 74 20 3a 3d 20 46 69 |...curre|nt := Fi|
|00002670| 6e 64 4e 65 78 74 43 6f | 6d 70 6f 6e 65 6e 74 28 |ndNextCo|mponent(|
|00002680| 63 75 72 72 65 6e 74 2c | 20 63 64 29 3b 0d 09 09 |current,| cd);...|
|00002690| 09 69 66 20 63 75 72 72 | 65 6e 74 20 3c 3e 20 6e |.if curr|ent <> n|
|000026a0| 69 6c 20 74 68 65 6e 20 | 62 65 67 69 6e 0d 09 09 |il then |begin...|
|000026b0| 09 09 69 66 20 47 65 74 | 43 6f 6d 70 6f 6e 65 6e |..if Get|Componen|
|000026c0| 74 49 6e 66 6f 28 63 75 | 72 72 65 6e 74 2c 20 66 |tInfo(cu|rrent, f|
|000026d0| 6f 75 6e 64 5f 63 64 2c | 20 6e 69 6c 2c 20 6e 69 |ound_cd,| nil, ni|
|000026e0| 6c 2c 20 6e 69 6c 29 20 | 3d 20 6e 6f 45 72 72 20 |l, nil) |= noErr |
|000026f0| 74 68 65 6e 20 62 65 67 | 69 6e 0d 09 09 09 09 09 |then beg|in......|
|00002700| 66 6f 75 6e 64 20 3a 3d | 20 28 66 6f 75 6e 64 5f |found :=| (found_|
|00002710| 63 64 2e 63 6f 6d 70 6f | 6e 65 6e 74 4d 61 6e 75 |cd.compo|nentManu|
|00002720| 66 61 63 74 75 72 65 72 | 20 3c 3e 20 6b 4f 75 72 |facturer| <> kOur|
|00002730| 43 6f 6d 70 6f 6e 65 6e | 74 4d 61 6e 75 66 61 63 |Componen|tManufac|
|00002740| 74 75 72 65 72 29 3b 0d | 09 09 09 09 65 6e 64 3b |turer);.|....end;|
|00002750| 20 28 2a 20 69 66 20 2a | 29 0d 09 09 09 65 6e 64 | (* if *|)....end|
|00002760| 3b 20 28 2a 20 69 66 20 | 2a 29 0d 09 09 75 6e 74 |; (* if |*)...unt|
|00002770| 69 6c 20 66 6f 75 6e 64 | 20 6f 72 20 28 63 75 72 |il found| or (cur|
|00002780| 72 65 6e 74 20 3d 20 6e | 69 6c 29 3b 0d 09 09 69 |rent = n|il);...i|
|00002790| 66 20 63 75 72 72 65 6e | 74 20 3d 20 6e 69 6c 20 |f curren|t = nil |
|000027a0| 74 68 65 6e 20 62 65 67 | 69 6e 0d 28 2a 20 44 65 |then beg|in.(* De|
|000027b0| 62 75 67 53 74 72 28 27 | 49 43 47 4f 46 69 6e 64 |bugStr('|ICGOFind|
|000027c0| 44 65 6c 65 67 61 74 65 | 20 66 61 69 6c 65 64 20 |Delegate| failed |
|000027d0| 74 6f 20 66 69 6e 64 20 | 6f 6e 65 2e 27 29 3b 20 |to find |one.'); |
|000027e0| 2a 29 0d 09 09 65 6e 64 | 3b 20 28 2a 20 69 66 20 |*)...end|; (* if |
|000027f0| 2a 29 0d 09 09 49 43 47 | 4f 46 69 6e 64 44 65 6c |*)...ICG|OFindDel|
|00002800| 65 67 61 74 65 20 3a 3d | 20 63 75 72 72 65 6e 74 |egate :=| current|
|00002810| 3b 0d 09 65 6e 64 3b 20 | 28 2a 20 49 43 47 4f 46 |;..end; |(* ICGOF|
|00002820| 69 6e 64 44 65 6c 65 67 | 61 74 65 20 2a 29 0d 0d |indDeleg|ate *)..|
|00002830| 28 2a 20 49 43 47 4f 4f | 70 65 6e 20 2a 29 0d 0d |(* ICGOO|pen *)..|
|00002840| 28 2a 20 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |(* This |function|
|00002850| 20 68 61 73 20 62 65 65 | 6e 20 73 75 62 73 74 61 | has bee|n substa|
|00002860| 6e 69 61 6c 6c 79 20 72 | 65 63 72 61 66 74 65 64 |nially r|ecrafted|
|00002870| 20 66 72 6f 6d 20 74 68 | 65 20 6f 72 69 67 69 6e | from th|e origin|
|00002880| 61 6c 2e 20 43 6c 6f 6e | 69 6e 67 20 2a 29 0d 28 |al. Clon|ing *).(|
|00002890| 2a 20 69 73 20 6e 6f 77 | 20 68 61 6e 64 6c 65 64 |* is now| handled|
|000028a0| 20 63 6f 72 72 65 63 74 | 6c 79 20 28 73 65 65 20 | correct|ly (see |
|000028b0| 74 68 65 20 64 65 73 63 | 72 69 70 74 69 6f 6e 20 |the desc|ription |
|000028c0| 6f 66 20 49 43 47 4f 46 | 69 78 43 6c 6f 6e 65 52 |of ICGOF|ixCloneR|
|000028d0| 65 66 43 6f 6e 29 20 61 | 6e 64 20 65 72 72 6f 72 |efCon) a|nd error|
|000028e0| 20 2a 29 0d 28 2a 20 68 | 61 6e 64 6c 69 6e 67 20 | *).(* h|andling |
|000028f0| 68 61 73 20 62 65 65 6e | 20 6d 61 64 65 20 6d 6f |has been| made mo|
|00002900| 72 65 20 67 72 61 63 65 | 66 75 6c 20 62 79 20 74 |re grace|ful by t|
|00002910| 68 65 20 61 64 64 69 74 | 69 6f 6e 20 6f 66 20 61 |he addit|ion of a|
|00002920| 20 64 65 64 69 63 61 74 | 65 64 20 63 6f 6e 74 72 | dedicat|ed contr|
|00002930| 6f 6c 20 2a 29 0d 28 2a | 20 73 74 72 75 63 74 75 |ol *).(*| structu|
|00002940| 72 65 2e 20 41 20 6d 65 | 6d 6f 72 79 20 6c 65 61 |re. A me|mory lea|
|00002950| 6b 20 68 61 73 20 62 65 | 65 6e 20 63 6c 6f 73 65 |k has be|en close|
|00002960| 64 20 61 6e 64 20 4f 70 | 65 6e 43 6f 6d 70 6f 6e |d and Op|enCompon|
|00002970| 65 6e 74 20 63 61 6e 20 | 6e 6f 20 6c 6f 6e 67 65 |ent can |no longe|
|00002980| 72 20 2a 29 0d 28 2a 20 | 62 65 20 63 61 6c 6c 65 |r *).(* |be calle|
|00002990| 64 20 6f 6e 20 61 20 4e | 55 4c 4c 20 63 6f 6d 70 |d on a N|ULL comp|
|000029a0| 6f 6e 65 6e 74 20 69 6e | 73 74 61 6e 63 65 2e 20 |onent in|stance. |
|000029b0| 2a 29 0d 0d 28 2a 20 49 | 66 20 79 6f 75 27 72 65 |*)..(* I|f you're|
|000029c0| 20 75 73 69 6e 67 20 74 | 68 65 20 70 61 73 63 61 | using t|he pasca|
|000029d0| 6c 20 76 65 72 73 69 6f | 6e 2c 20 79 6f 75 27 6c |l versio|n, you'l|
|000029e0| 6c 20 77 61 6e 74 20 74 | 6f 20 63 61 72 65 66 75 |l want t|o carefu|
|000029f0| 6c 6c 79 20 65 78 61 6d | 69 6e 65 20 74 68 65 20 |lly exam|ine the |
|00002a00| 2a 29 0d 28 2a 20 64 69 | 66 66 65 72 65 6e 63 65 |*).(* di|fference|
|00002a10| 73 2e 20 2a 29 0d 0d 09 | 66 75 6e 63 74 69 6f 6e |s. *)...|function|
|00002a20| 20 49 43 47 4f 4f 70 65 | 6e 20 28 67 6c 6f 62 61 | ICGOOpe|n (globa|
|00002a30| 6c 73 3a 20 67 6c 6f 62 | 61 6c 73 48 61 6e 64 6c |ls: glob|alsHandl|
|00002a40| 65 3b 20 73 65 6c 66 3a | 20 43 6f 6d 70 6f 6e 65 |e; self:| Compone|
|00002a50| 6e 74 49 6e 73 74 61 6e | 63 65 29 3a 20 43 6f 6d |ntInstan|ce): Com|
|00002a60| 70 6f 6e 65 6e 74 52 65 | 73 75 6c 74 3b 0d 09 09 |ponentRe|sult;...|
|00002a70| 76 61 72 0d 09 09 09 65 | 72 72 3a 20 43 6f 6d 70 |var....e|rr: Comp|
|00002a80| 6f 6e 65 6e 74 52 65 73 | 75 6c 74 3b 0d 09 09 09 |onentRes|ult;....|
|00002a90| 63 61 70 3a 20 43 6f 6d | 70 6f 6e 65 6e 74 3b 0d |cap: Com|ponent;.|
|00002aa0| 09 09 09 74 6f 43 61 70 | 74 75 72 65 3a 20 43 6f |...toCap|ture: Co|
|00002ab0| 6d 70 6f 6e 65 6e 74 3b | 0d 09 62 65 67 69 6e 0d |mponent;|..begin.|
|00002ac0| 09 09 67 6c 6f 62 61 6c | 73 20 3a 3d 20 6e 69 6c |..global|s := nil|
|00002ad0| 3b 0d 09 09 65 72 72 20 | 3a 3d 20 49 43 47 4f 46 |;...err |:= ICGOF|
|00002ae0| 69 78 43 6c 6f 6e 65 52 | 65 66 43 6f 6e 28 73 65 |ixCloneR|efCon(se|
|00002af0| 6c 66 29 3b 0d 09 09 69 | 66 20 65 72 72 20 3d 20 |lf);...i|f err = |
|00002b00| 6e 6f 45 72 72 20 74 68 | 65 6e 20 62 65 67 69 6e |noErr th|en begin|
|00002b10| 0d 09 09 09 67 6c 6f 62 | 61 6c 73 20 3a 3d 20 67 |....glob|als := g|
|00002b20| 6c 6f 62 61 6c 73 48 61 | 6e 64 6c 65 28 4e 65 77 |lobalsHa|ndle(New|
|00002b30| 48 61 6e 64 6c 65 43 6c | 65 61 72 28 73 69 7a 65 |HandleCl|ear(size|
|00002b40| 6f 66 28 67 6c 6f 62 61 | 6c 73 52 65 63 6f 72 64 |of(globa|lsRecord|
|00002b50| 29 29 29 3b 0d 09 09 09 | 65 72 72 20 3a 3d 20 4d |)));....|err := M|
|00002b60| 65 6d 45 72 72 6f 72 3b | 0d 09 09 65 6e 64 3b 20 |emError;|...end; |
|00002b70| 28 2a 20 69 66 20 2a 29 | 0d 09 09 69 66 20 65 72 |(* if *)|...if er|
|00002b80| 72 20 3d 20 6e 6f 45 72 | 72 20 74 68 65 6e 20 62 |r = noEr|r then b|
|00002b90| 65 67 69 6e 0d 09 09 09 | 48 4c 6f 63 6b 28 48 61 |egin....|HLock(Ha|
|00002ba0| 6e 64 6c 65 28 67 6c 6f | 62 61 6c 73 29 29 3b 0d |ndle(glo|bals));.|
|00002bb0| 0d 09 09 09 67 6c 6f 62 | 61 6c 73 5e 5e 2e 73 65 |....glob|als^^.se|
|00002bc0| 6c 66 20 3a 3d 20 73 65 | 6c 66 3b 0d 09 09 09 53 |lf := se|lf;....S|
|00002bd0| 65 74 43 6f 6d 70 6f 6e | 65 6e 74 49 6e 73 74 61 |etCompon|entInsta|
|00002be0| 6e 63 65 53 74 6f 72 61 | 67 65 28 73 65 6c 66 2c |nceStora|ge(self,|
|00002bf0| 20 48 61 6e 64 6c 65 28 | 67 6c 6f 62 61 6c 73 29 | Handle(|globals)|
|00002c00| 29 3b 0d 09 09 09 65 72 | 72 20 3a 3d 20 49 43 47 |);....er|r := ICG|
|00002c10| 4f 47 65 74 53 68 61 72 | 65 64 47 6c 6f 62 61 6c |OGetShar|edGlobal|
|00002c20| 73 28 67 6c 6f 62 61 6c | 73 29 3b 0d 09 09 65 6e |s(global|s);...en|
|00002c30| 64 3b 20 28 2a 20 69 66 | 20 2a 29 0d 0d 09 09 69 |d; (* if| *)....i|
|00002c40| 66 20 65 72 72 20 3d 20 | 6e 6f 45 72 72 20 74 68 |f err = |noErr th|
|00002c50| 65 6e 20 62 65 67 69 6e | 0d 09 09 09 28 2a 20 49 |en begin|....(* I|
|00002c60| 66 20 77 65 20 68 61 76 | 65 6e 27 74 20 79 65 74 |f we hav|en't yet|
|00002c70| 20 64 6f 6e 65 20 73 6f | 2c 20 66 69 6e 64 20 61 | done so|, find a|
|00002c80| 6e 64 20 63 61 70 74 75 | 72 65 20 74 68 65 2a 29 |nd captu|re the*)|
|00002c90| 0d 09 09 09 28 2a 09 20 | 74 6f 70 6d 6f 73 74 20 |....(*. |topmost |
|00002ca0| 49 43 20 63 6f 6d 70 6f | 6e 65 6e 74 2e 20 57 65 |IC compo|nent. We|
|00002cb0| 27 6c 6c 20 73 61 76 65 | 20 74 68 65 20 73 70 65 |'ll save| the spe|
|00002cc0| 63 69 61 6c 2a 29 0d 09 | 09 09 28 2a 09 20 63 6f |cial*)..|..(*. co|
|00002cd0| 6d 70 6f 6e 65 6e 74 20 | 69 64 65 6e 74 69 66 69 |mponent |identifi|
|00002ce0| 65 72 20 77 68 69 63 68 | 20 77 69 6c 6c 20 70 65 |er which| will pe|
|00002cf0| 72 6d 69 74 20 75 73 20 | 74 6f 2a 29 0d 09 09 09 |rmit us |to*)....|
|00002d00| 28 2a 20 6f 70 65 6e 20 | 69 74 2e 2a 29 0d 09 09 |(* open |it.*)...|
|00002d10| 09 69 66 20 67 6c 6f 62 | 61 6c 73 5e 5e 2e 73 68 |.if glob|als^^.sh|
|00002d20| 61 72 65 64 5e 2e 64 65 | 6c 65 67 61 74 65 20 3d |ared^.de|legate =|
|00002d30| 20 6e 69 6c 20 74 68 65 | 6e 20 62 65 67 69 6e 0d | nil the|n begin.|
|00002d40| 09 09 09 09 74 6f 43 61 | 70 74 75 72 65 20 3a 3d |....toCa|pture :=|
|00002d50| 20 49 43 47 4f 46 69 6e | 64 44 65 6c 65 67 61 74 | ICGOFin|dDelegat|
|00002d60| 65 28 43 6f 6d 70 6f 6e | 65 6e 74 28 73 65 6c 66 |e(Compon|ent(self|
|00002d70| 29 29 3b 0d 09 09 09 09 | 69 66 20 74 6f 43 61 70 |));.....|if toCap|
|00002d80| 74 75 72 65 20 3d 20 6e | 69 6c 20 74 68 65 6e 20 |ture = n|il then |
|00002d90| 62 65 67 69 6e 0d 09 09 | 09 09 09 65 72 72 20 3a |begin...|...err :|
|00002da0| 3d 20 69 63 4e 6f 74 68 | 69 6e 67 54 6f 4f 76 65 |= icNoth|ingToOve|
|00002db0| 72 72 69 64 65 45 72 72 | 3b 0d 09 09 09 09 65 6e |rrideErr|;.....en|
|00002dc0| 64 0d 09 09 09 09 65 6c | 73 65 20 62 65 67 69 6e |d.....el|se begin|
|00002dd0| 0d 09 09 09 09 09 67 6c | 6f 62 61 6c 73 5e 5e 2e |......gl|obals^^.|
|00002de0| 73 68 61 72 65 64 5e 2e | 64 65 6c 65 67 61 74 65 |shared^.|delegate|
|00002df0| 20 3a 3d 20 43 61 70 74 | 75 72 65 43 6f 6d 70 6f | := Capt|ureCompo|
|00002e00| 6e 65 6e 74 28 74 6f 43 | 61 70 74 75 72 65 2c 20 |nent(toC|apture, |
|00002e10| 43 6f 6d 70 6f 6e 65 6e | 74 28 73 65 6c 66 29 29 |Componen|t(self))|
|00002e20| 3b 0d 09 09 09 09 65 6e | 64 3b 20 28 2a 20 69 66 |;.....en|d; (* if|
|00002e30| 20 2a 29 0d 09 09 09 65 | 6e 64 3b 20 28 2a 20 69 | *)....e|nd; (* i|
|00002e40| 66 20 2a 29 0d 09 09 09 | 69 66 20 65 72 72 20 3d |f *)....|if err =|
|00002e50| 20 6e 6f 45 72 72 20 74 | 68 65 6e 20 62 65 67 69 | noErr t|hen begi|
|00002e60| 6e 0d 09 09 09 09 67 6c | 6f 62 61 6c 73 5e 5e 2e |n.....gl|obals^^.|
|00002e70| 64 65 6c 65 67 61 74 65 | 20 3a 3d 20 4f 70 65 6e |delegate| := Open|
|00002e80| 43 6f 6d 70 6f 6e 65 6e | 74 28 67 6c 6f 62 61 6c |Componen|t(global|
|00002e90| 73 5e 5e 2e 73 68 61 72 | 65 64 5e 2e 64 65 6c 65 |s^^.shar|ed^.dele|
|00002ea0| 67 61 74 65 29 3b 0d 09 | 09 09 09 65 72 72 20 3a |gate);..|...err :|
|00002eb0| 3d 20 43 6f 6d 70 6f 6e | 65 6e 74 53 65 74 54 61 |= Compon|entSetTa|
|00002ec0| 72 67 65 74 28 73 65 6c | 66 2c 20 73 65 6c 66 29 |rget(sel|f, self)|
|00002ed0| 3b 0d 09 09 09 65 6e 64 | 3b 20 28 2a 20 69 66 20 |;....end|; (* if |
|00002ee0| 2a 29 0d 09 09 09 69 66 | 20 65 72 72 20 3d 20 6e |*)....if| err = n|
|00002ef0| 6f 45 72 72 20 74 68 65 | 6e 20 62 65 67 69 6e 0d |oErr the|n begin.|
|00002f00| 09 09 09 09 65 72 72 20 | 3a 3d 20 49 43 53 4f 49 |....err |:= ICSOI|
|00002f10| 6e 69 74 47 6c 6f 62 61 | 6c 73 28 67 6c 6f 62 61 |nitGloba|ls(globa|
|00002f20| 6c 73 29 3b 0d 09 09 09 | 65 6e 64 3b 20 28 2a 20 |ls);....|end; (* |
|00002f30| 69 66 20 2a 29 0d 09 09 | 65 6e 64 3b 20 28 2a 20 |if *)...|end; (* |
|00002f40| 69 66 20 2a 29 0d 0d 09 | 09 69 66 20 67 6c 6f 62 |if *)...|.if glob|
|00002f50| 61 6c 73 20 3c 3e 20 6e | 69 6c 20 74 68 65 6e 20 |als <> n|il then |
|00002f60| 62 65 67 69 6e 0d 09 09 | 09 48 55 6e 6c 6f 63 6b |begin...|.HUnlock|
|00002f70| 28 48 61 6e 64 6c 65 28 | 67 6c 6f 62 61 6c 73 29 |(Handle(|globals)|
|00002f80| 29 3b 0d 09 09 65 6e 64 | 3b 20 28 2a 20 69 66 20 |);...end|; (* if |
|00002f90| 2a 29 0d 09 09 69 66 20 | 65 72 72 20 3c 3e 20 6e |*)...if |err <> n|
|00002fa0| 6f 45 72 72 20 74 68 65 | 6e 20 62 65 67 69 6e 0d |oErr the|n begin.|
|00002fb0| 09 09 09 69 66 20 67 6c | 6f 62 61 6c 73 20 3c 3e |...if gl|obals <>|
|00002fc0| 20 6e 69 6c 20 74 68 65 | 6e 20 62 65 67 69 6e 0d | nil the|n begin.|
|00002fd0| 09 09 09 09 44 69 73 70 | 6f 73 65 48 61 6e 64 6c |....Disp|oseHandl|
|00002fe0| 65 28 48 61 6e 64 6c 65 | 28 67 6c 6f 62 61 6c 73 |e(Handle|(globals|
|00002ff0| 29 29 3b 0d 09 09 09 09 | 53 65 74 43 6f 6d 70 6f |));.....|SetCompo|
|00003000| 6e 65 6e 74 49 6e 73 74 | 61 6e 63 65 53 74 6f 72 |nentInst|anceStor|
|00003010| 61 67 65 28 73 65 6c 66 | 2c 20 6e 69 6c 29 3b 0d |age(self|, nil);.|
|00003020| 09 09 09 65 6e 64 3b 20 | 28 2a 20 69 66 20 2a 29 |...end; |(* if *)|
|00003030| 0d 09 09 65 6e 64 3b 20 | 28 2a 20 69 66 20 2a 29 |...end; |(* if *)|
|00003040| 0d 0d 09 09 49 43 47 4f | 4f 70 65 6e 20 3a 3d 20 |....ICGO|Open := |
|00003050| 65 72 72 3b 0d 09 65 6e | 64 3b 20 28 2a 20 49 43 |err;..en|d; (* IC|
|00003060| 47 4f 4f 70 65 6e 20 2a | 29 0d 0d 09 66 75 6e 63 |GOOpen *|)...func|
|00003070| 74 69 6f 6e 20 49 43 47 | 4f 43 6c 6f 73 65 20 28 |tion ICG|OClose (|
|00003080| 67 6c 6f 62 61 6c 73 3a | 20 67 6c 6f 62 61 6c 73 |globals:| globals|
|00003090| 48 61 6e 64 6c 65 3b 20 | 73 65 6c 66 3a 20 43 6f |Handle; |self: Co|
|000030a0| 6d 70 6f 6e 65 6e 74 49 | 6e 73 74 61 6e 63 65 29 |mponentI|nstance)|
|000030b0| 3a 20 43 6f 6d 70 6f 6e | 65 6e 74 52 65 73 75 6c |: Compon|entResul|
|000030c0| 74 3b 0d 09 28 2a 20 48 | 61 6e 64 6c 65 20 74 68 |t;..(* H|andle th|
|000030d0| 65 20 43 6f 6d 70 6f 6e | 65 6e 74 20 4d 61 6e 61 |e Compon|ent Mana|
|000030e0| 67 65 72 20 43 6c 6f 73 | 65 20 72 65 71 75 65 73 |ger Clos|e reques|
|000030f0| 74 2e 20 2a 29 0d 09 09 | 76 61 72 0d 09 09 09 65 |t. *)...|var....e|
|00003100| 72 72 3a 20 43 6f 6d 70 | 6f 6e 65 6e 74 52 65 73 |rr: Comp|onentRes|
|00003110| 75 6c 74 3b 0d 09 09 09 | 6a 75 6e 6b 3a 20 4f 53 |ult;....|junk: OS|
|00003120| 45 72 72 3b 0d 09 62 65 | 67 69 6e 0d 09 09 65 72 |Err;..be|gin...er|
|00003130| 72 20 3a 3d 20 6e 6f 45 | 72 72 3b 0d 09 09 69 66 |r := noE|rr;...if|
|00003140| 20 67 6c 6f 62 61 6c 73 | 20 3c 3e 20 6e 69 6c 20 | globals| <> nil |
|00003150| 74 68 65 6e 20 62 65 67 | 69 6e 0d 09 09 09 6a 75 |then beg|in....ju|
|00003160| 6e 6b 20 3a 3d 20 49 43 | 53 4f 43 6c 65 61 6e 47 |nk := IC|SOCleanG|
|00003170| 6c 6f 62 61 6c 73 28 67 | 6c 6f 62 61 6c 73 29 3b |lobals(g|lobals);|
|00003180| 0d 09 09 09 69 66 20 67 | 6c 6f 62 61 6c 73 5e 5e |....if g|lobals^^|
|00003190| 2e 64 65 6c 65 67 61 74 | 65 20 3c 3e 20 6e 69 6c |.delegat|e <> nil|
|000031a0| 20 74 68 65 6e 20 62 65 | 67 69 6e 0d 09 09 09 09 | then be|gin.....|
|000031b0| 6a 75 6e 6b 20 3a 3d 20 | 43 6c 6f 73 65 43 6f 6d |junk := |CloseCom|
|000031c0| 70 6f 6e 65 6e 74 28 67 | 6c 6f 62 61 6c 73 5e 5e |ponent(g|lobals^^|
|000031d0| 2e 64 65 6c 65 67 61 74 | 65 29 0d 09 09 09 65 6e |.delegat|e)....en|
|000031e0| 64 3b 20 28 2a 20 69 66 | 20 2a 29 0d 09 09 09 44 |d; (* if| *)....D|
|000031f0| 69 73 70 6f 73 65 48 61 | 6e 64 6c 65 28 48 61 6e |isposeHa|ndle(Han|
|00003200| 64 6c 65 28 67 6c 6f 62 | 61 6c 73 29 29 3b 0d 09 |dle(glob|als));..|
|00003210| 09 65 6e 64 3b 20 28 2a | 20 69 66 20 2a 29 0d 09 |.end; (*| if *)..|
|00003220| 09 49 43 47 4f 43 6c 6f | 73 65 20 3a 3d 20 65 72 |.ICGOClo|se := er|
|00003230| 72 3b 0d 09 65 6e 64 3b | 20 28 2a 20 49 43 47 4f |r;..end;| (* ICGO|
|00003240| 43 6c 6f 73 65 20 2a 29 | 0d 0d 09 66 75 6e 63 74 |Close *)|...funct|
|00003250| 69 6f 6e 20 49 43 47 4f | 54 61 72 67 65 74 20 28 |ion ICGO|Target (|
|00003260| 67 6c 6f 62 61 6c 73 3a | 20 67 6c 6f 62 61 6c 73 |globals:| globals|
|00003270| 48 61 6e 64 6c 65 3b 20 | 6e 65 77 5f 74 61 72 67 |Handle; |new_targ|
|00003280| 65 74 3a 20 43 6f 6d 70 | 6f 6e 65 6e 74 49 6e 73 |et: Comp|onentIns|
|00003290| 74 61 6e 63 65 29 3a 20 | 43 6f 6d 70 6f 6e 65 6e |tance): |Componen|
|000032a0| 74 52 65 73 75 6c 74 3b | 0d 09 28 2a 20 48 61 6e |tResult;|..(* Han|
|000032b0| 64 6c 65 20 74 68 65 20 | 43 6f 6d 70 6f 6e 65 6e |dle the |Componen|
|000032c0| 74 20 4d 61 6e 61 67 65 | 72 20 54 61 72 67 65 74 |t Manage|r Target|
|000032d0| 2e 20 2a 29 0d 09 09 76 | 61 72 0d 09 09 09 65 72 |. *)...v|ar....er|
|000032e0| 72 3a 20 43 6f 6d 70 6f | 6e 65 6e 74 52 65 73 75 |r: Compo|nentResu|
|000032f0| 6c 74 3b 0d 09 62 65 67 | 69 6e 0d 09 09 67 6c 6f |lt;..beg|in...glo|
|00003300| 62 61 6c 73 5e 5e 2e 74 | 61 72 67 65 74 20 3a 3d |bals^^.t|arget :=|
|00003310| 20 6e 65 77 5f 74 61 72 | 67 65 74 3b 0d 09 09 69 | new_tar|get;...i|
|00003320| 66 20 67 6c 6f 62 61 6c | 73 5e 5e 2e 64 65 6c 65 |f global|s^^.dele|
|00003330| 67 61 74 65 20 3c 3e 20 | 6e 69 6c 20 74 68 65 6e |gate <> |nil then|
|00003340| 20 62 65 67 69 6e 0d 09 | 09 09 65 72 72 20 3a 3d | begin..|..err :=|
|00003350| 20 43 6f 6d 70 6f 6e 65 | 6e 74 53 65 74 54 61 72 | Compone|ntSetTar|
|00003360| 67 65 74 28 67 6c 6f 62 | 61 6c 73 5e 5e 2e 64 65 |get(glob|als^^.de|
|00003370| 6c 65 67 61 74 65 2c 20 | 6e 65 77 5f 74 61 72 67 |legate, |new_targ|
|00003380| 65 74 29 3b 0d 09 09 65 | 6e 64 0d 09 09 65 6c 73 |et);...e|nd...els|
|00003390| 65 20 62 65 67 69 6e 0d | 09 09 09 65 72 72 20 3a |e begin.|...err :|
|000033a0| 3d 20 6e 6f 45 72 72 3b | 0d 09 09 65 6e 64 3b 20 |= noErr;|...end; |
|000033b0| 28 2a 20 69 66 20 2a 29 | 0d 09 09 49 43 47 4f 54 |(* if *)|...ICGOT|
|000033c0| 61 72 67 65 74 20 3a 3d | 20 65 72 72 3b 0d 09 65 |arget :=| err;..e|
|000033d0| 6e 64 3b 20 28 2a 20 49 | 43 47 4f 54 61 72 67 65 |nd; (* I|CGOTarge|
|000033e0| 74 20 2a 29 0d 0d 28 2a | 20 49 6e 74 65 72 6e 65 |t *)..(*| Interne|
|000033f0| 74 20 43 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |t Config|uration |
|00003400| 73 70 65 63 69 66 69 63 | 20 72 6f 75 74 69 6e 65 |specific| routine|
|00003410| 73 20 2a 29 0d 0d 09 66 | 75 6e 63 74 69 6f 6e 20 |s *)...f|unction |
|00003420| 4d 61 69 6e 20 28 76 61 | 72 20 70 61 72 61 6d 73 |Main (va|r params|
|00003430| 3a 20 43 6f 6d 70 6f 6e | 65 6e 74 50 61 72 61 6d |: Compon|entParam|
|00003440| 65 74 65 72 73 3b 20 73 | 74 6f 72 61 67 65 3a 20 |eters; s|torage: |
|00003450| 48 61 6e 64 6c 65 29 3a | 20 43 6f 6d 70 6f 6e 65 |Handle):| Compone|
|00003460| 6e 74 52 65 73 75 6c 74 | 3b 0d 09 28 2a 20 43 6f |ntResult|;..(* Co|
|00003470| 6d 70 6f 6e 65 6e 74 20 | 65 6e 74 72 79 20 70 6f |mponent |entry po|
|00003480| 69 6e 74 2e 20 20 49 74 | 27 73 20 70 72 65 74 74 |int. It|'s prett|
|00003490| 79 20 6e 65 61 74 20 49 | 4d 48 4f 2e 20 2a 29 0d |y neat I|MHO. *).|
|000034a0| 09 09 76 61 72 0d 09 09 | 09 70 72 6f 63 3a 20 50 |..var...|.proc: P|
|000034b0| 72 6f 63 50 74 72 3b 0d | 09 09 09 73 3a 20 73 69 |rocPtr;.|...s: si|
|000034c0| 67 6e 65 64 42 79 74 65 | 3b 0d 09 09 09 72 65 73 |gnedByte|;....res|
|000034d0| 3a 20 6c 6f 6e 67 69 6e | 74 3b 0d 09 62 65 67 69 |: longin|t;..begi|
|000034e0| 6e 0d 09 09 70 72 6f 63 | 20 3a 3d 20 6e 69 6c 3b |n...proc| := nil;|
|000034f0| 0d 7b 24 69 66 63 20 64 | 65 62 75 67 5f 63 6f 6d |.{$ifc d|ebug_com|
|00003500| 70 6f 6e 65 6e 74 5f 65 | 6e 74 72 79 5f 65 78 69 |ponent_e|ntry_exi|
|00003510| 74 7d 0d 09 09 44 65 62 | 75 67 53 74 72 28 63 6f |t}...Deb|ugStr(co|
|00003520| 6e 63 61 74 28 27 45 6e | 74 65 72 20 27 2c 20 53 |ncat('En|ter ', S|
|00003530| 65 6c 65 63 74 6f 72 54 | 6f 53 74 72 28 70 61 72 |electorT|oStr(par|
|00003540| 61 6d 73 2e 77 68 61 74 | 29 29 29 3b 0d 7b 24 65 |ams.what|)));.{$e|
|00003550| 6e 64 63 7d 0d 09 09 63 | 61 73 65 20 70 61 72 61 |ndc}...c|ase para|
|00003560| 6d 73 2e 77 68 61 74 20 | 6f 66 0d 09 09 09 28 2a |ms.what |of....(*|
|00003570| 20 43 6f 6d 70 6f 6e 65 | 6e 74 20 4d 61 6e 61 67 | Compone|nt Manag|
|00003580| 65 72 20 73 74 75 66 66 | 20 2a 29 0d 09 09 09 6b |er stuff| *)....k|
|00003590| 43 6f 6d 70 6f 6e 65 6e | 74 56 65 72 73 69 6f 6e |Componen|tVersion|
|000035a0| 53 65 6c 65 63 74 3a 20 | 0d 09 09 09 09 4d 61 69 |Select: |.....Mai|
|000035b0| 6e 20 3a 3d 20 69 6e 74 | 65 72 6e 65 74 43 6f 6e |n := int|ernetCon|
|000035c0| 66 69 67 75 72 61 74 69 | 6f 6e 43 6f 6d 70 6f 6e |figurati|onCompon|
|000035d0| 65 6e 74 49 6e 74 65 72 | 66 61 63 65 56 65 72 73 |entInter|faceVers|
|000035e0| 69 6f 6e 3b 0d 09 09 09 | 6b 43 6f 6d 70 6f 6e 65 |ion;....|kCompone|
|000035f0| 6e 74 43 61 6e 44 6f 53 | 65 6c 65 63 74 3a 20 0d |ntCanDoS|elect: .|
|00003600| 09 09 09 09 70 72 6f 63 | 20 3a 3d 20 40 49 43 47 |....proc| := @ICG|
|00003610| 4f 43 61 6e 44 6f 3b 0d | 09 09 09 6b 43 6f 6d 70 |OCanDo;.|...kComp|
|00003620| 6f 6e 65 6e 74 4f 70 65 | 6e 53 65 6c 65 63 74 3a |onentOpe|nSelect:|
|00003630| 20 0d 09 09 09 09 70 72 | 6f 63 20 3a 3d 20 40 49 | .....pr|oc := @I|
|00003640| 43 47 4f 4f 70 65 6e 3b | 0d 09 09 09 6b 43 6f 6d |CGOOpen;|....kCom|
|00003650| 70 6f 6e 65 6e 74 43 6c | 6f 73 65 53 65 6c 65 63 |ponentCl|oseSelec|
|00003660| 74 3a 20 0d 09 09 09 09 | 70 72 6f 63 20 3a 3d 20 |t: .....|proc := |
|00003670| 40 49 43 47 4f 43 6c 6f | 73 65 3b 0d 09 09 09 6b |@ICGOClo|se;....k|
|00003680| 43 6f 6d 70 6f 6e 65 6e | 74 54 61 72 67 65 74 53 |Componen|tTargetS|
|00003690| 65 6c 65 63 74 3a 20 0d | 09 09 09 09 70 72 6f 63 |elect: .|....proc|
|000036a0| 20 3a 3d 20 40 49 43 47 | 4f 54 61 72 67 65 74 3b | := @ICG|OTarget;|
|000036b0| 0d 09 09 09 6b 43 6f 6d | 70 6f 6e 65 6e 74 52 65 |....kCom|ponentRe|
|000036c0| 67 69 73 74 65 72 53 65 | 6c 65 63 74 3a 20 0d 09 |gisterSe|lect: ..|
|000036d0| 09 09 09 70 72 6f 63 20 | 3a 3d 20 40 49 43 47 4f |...proc |:= @ICGO|
|000036e0| 52 65 67 69 73 74 65 72 | 3b 0d 09 09 09 6b 43 6f |Register|;....kCo|
|000036f0| 6d 70 6f 6e 65 6e 74 55 | 6e 72 65 67 69 73 74 65 |mponentU|nregiste|
|00003700| 72 53 65 6c 65 63 74 3a | 20 0d 09 09 09 09 70 72 |rSelect:| .....pr|
|00003710| 6f 63 20 3a 3d 20 40 49 | 43 47 4f 55 6e 72 65 67 |oc := @I|CGOUnreg|
|00003720| 69 73 74 65 72 3b 0d 09 | 09 09 28 2a 20 74 68 69 |ister;..|..(* thi|
|00003730| 73 20 63 6f 6d 70 6f 6e | 65 6e 74 20 74 79 70 65 |s compon|ent type|
|00003740| 20 73 74 75 66 66 20 2a | 29 0d 09 09 09 6f 74 68 | stuff *|)....oth|
|00003750| 65 72 77 69 73 65 0d 09 | 09 09 09 70 72 6f 63 20 |erwise..|...proc |
|00003760| 3a 3d 20 49 43 53 4f 57 | 68 61 74 54 6f 4f 76 65 |:= ICSOW|hatToOve|
|00003770| 72 72 69 64 65 28 67 6c | 6f 62 61 6c 73 48 61 6e |rride(gl|obalsHan|
|00003780| 64 6c 65 28 73 74 6f 72 | 61 67 65 29 2c 20 70 61 |dle(stor|age), pa|
|00003790| 72 61 6d 73 2e 77 68 61 | 74 29 3b 0d 09 09 65 6e |rams.wha|t);...en|
|000037a0| 64 3b 20 28 2a 20 63 61 | 73 65 20 2a 29 0d 09 09 |d; (* ca|se *)...|
|000037b0| 69 66 20 73 74 6f 72 61 | 67 65 20 3c 3e 20 6e 69 |if stora|ge <> ni|
|000037c0| 6c 20 74 68 65 6e 20 62 | 65 67 69 6e 0d 09 09 09 |l then b|egin....|
|000037d0| 73 20 3a 3d 20 48 47 65 | 74 53 74 61 74 65 28 73 |s := HGe|tState(s|
|000037e0| 74 6f 72 61 67 65 29 3b | 0d 09 09 09 48 4c 6f 63 |torage);|....HLoc|
|000037f0| 6b 28 73 74 6f 72 61 67 | 65 29 3b 0d 09 09 65 6e |k(storag|e);...en|
|00003800| 64 3b 20 28 2a 20 69 66 | 20 2a 29 0d 09 09 72 65 |d; (* if| *)...re|
|00003810| 73 20 3a 3d 20 64 65 6c | 65 67 61 74 65 54 68 69 |s := del|egateThi|
|00003820| 73 43 61 6c 6c 45 72 72 | 3b 0d 09 09 69 66 20 70 |sCallErr|;...if p|
|00003830| 72 6f 63 20 3c 3e 20 6e | 69 6c 20 74 68 65 6e 20 |roc <> n|il then |
|00003840| 62 65 67 69 6e 0d 09 09 | 09 72 65 73 20 3a 3d 20 |begin...|.res := |
|00003850| 43 61 6c 6c 43 6f 6d 70 | 6f 6e 65 6e 74 46 75 6e |CallComp|onentFun|
|00003860| 63 74 69 6f 6e 57 69 74 | 68 53 74 6f 72 61 67 65 |ctionWit|hStorage|
|00003870| 28 73 74 6f 72 61 67 65 | 2c 20 70 61 72 61 6d 73 |(storage|, params|
|00003880| 2c 20 70 72 6f 63 29 3b | 0d 09 09 65 6e 64 3b 20 |, proc);|...end; |
|00003890| 28 2a 20 69 66 20 2a 29 | 0d 09 09 69 66 20 72 65 |(* if *)|...if re|
|000038a0| 73 20 3d 20 64 65 6c 65 | 67 61 74 65 54 68 69 73 |s = dele|gateThis|
|000038b0| 43 61 6c 6c 45 72 72 20 | 74 68 65 6e 20 62 65 67 |CallErr |then beg|
|000038c0| 69 6e 0d 09 09 09 72 65 | 73 20 3a 3d 20 44 65 6c |in....re|s := Del|
|000038d0| 65 67 61 74 65 43 6f 6d | 70 6f 6e 65 6e 74 43 61 |egateCom|ponentCa|
|000038e0| 6c 6c 28 70 61 72 61 6d | 73 2c 20 67 6c 6f 62 61 |ll(param|s, globa|
|000038f0| 6c 73 48 61 6e 64 6c 65 | 28 73 74 6f 72 61 67 65 |lsHandle|(storage|
|00003900| 29 5e 5e 2e 64 65 6c 65 | 67 61 74 65 29 3b 0d 09 |)^^.dele|gate);..|
|00003910| 09 65 6e 64 3b 20 28 2a | 20 69 66 20 2a 29 0d 7b |.end; (*| if *).{|
|00003920| 24 69 66 63 20 64 65 62 | 75 67 5f 63 6f 6d 70 6f |$ifc deb|ug_compo|
|00003930| 6e 65 6e 74 5f 65 6e 74 | 72 79 5f 65 78 69 74 7d |nent_ent|ry_exit}|
|00003940| 0d 09 09 44 65 62 75 67 | 53 74 72 28 63 6f 6e 63 |...Debug|Str(conc|
|00003950| 61 74 28 27 45 78 69 74 | 20 27 2c 20 53 65 6c 65 |at('Exit| ', Sele|
|00003960| 63 74 6f 72 54 6f 53 74 | 72 28 70 61 72 61 6d 73 |ctorToSt|r(params|
|00003970| 2e 77 68 61 74 29 2c 20 | 27 20 77 69 74 68 20 72 |.what), |' with r|
|00003980| 65 73 75 6c 74 20 27 2c | 20 49 43 47 4f 44 65 63 |esult ',| ICGODec|
|00003990| 53 74 72 28 72 65 73 29 | 29 29 3b 0d 7b 24 65 6e |Str(res)|));.{$en|
|000039a0| 64 63 7d 0d 09 09 4d 61 | 69 6e 20 3a 3d 20 72 65 |dc}...Ma|in := re|
|000039b0| 73 3b 0d 09 09 69 66 20 | 28 73 74 6f 72 61 67 65 |s;...if |(storage|
|000039c0| 20 3c 3e 20 6e 69 6c 29 | 20 61 6e 64 20 28 70 61 | <> nil)| and (pa|
|000039d0| 72 61 6d 73 2e 77 68 61 | 74 20 3c 3e 20 6b 43 6f |rams.wha|t <> kCo|
|000039e0| 6d 70 6f 6e 65 6e 74 43 | 6c 6f 73 65 53 65 6c 65 |mponentC|loseSele|
|000039f0| 63 74 29 20 74 68 65 6e | 20 62 65 67 69 6e 0d 09 |ct) then| begin..|
|00003a00| 09 09 48 53 65 74 53 74 | 61 74 65 28 73 74 6f 72 |..HSetSt|ate(stor|
|00003a10| 61 67 65 2c 20 73 29 3b | 0d 09 09 65 6e 64 3b 20 |age, s);|...end; |
|00003a20| 28 2a 20 69 66 20 2a 29 | 0d 09 65 6e 64 3b 20 28 |(* if *)|..end; (|
|00003a30| 2a 20 4d 61 69 6e 20 2a | 29 0d 0d 65 6e 64 2e 20 |* Main *|)..end. |
|00003a40| 28 2a 20 49 43 47 65 6e | 65 72 69 63 4f 76 65 72 |(* ICGen|ericOver|
|00003a50| 72 69 64 65 20 2a 29 00 | 00 00 00 00 00 00 00 00 |ride *).|........|
|00003a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a80| 00 00 01 00 00 00 03 ae | 00 00 02 ae 00 00 00 85 |........|........|
|00003a90| 68 65 20 73 6f 75 72 63 | 65 20 64 69 72 65 63 74 |he sourc|e direct|
|00003aa0| 6f 72 69 65 73 0d 0d 22 | 7b 4f 62 6a 65 63 74 73 |ories.."|{Objects|
|00003ab0| 13 49 43 47 65 6e 65 72 | 69 63 4f 76 65 72 72 69 |.ICGener|icOverri|
|00003ac0| 64 65 2e 70 02 00 00 00 | 54 45 58 54 50 4a 4d 4d |de.p....|TEXTPJMM|
|00003ad0| 00 00 54 45 58 54 50 4a | 4d 4d 01 00 00 00 00 00 |..TEXTPJ|MM......|
|00003ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003af0| 00 00 a9 21 21 71 00 00 | 39 d7 00 00 04 33 43 47 |...!!q..|9....3CG|
|00003b00| 6c 75 65 2e 6f 20 69 73 | 20 6d 61 64 65 20 62 79 |lue.o is| made by|
|00003b10| 20 61 20 73 69 6d 70 6c | 65 20 6c 69 62 0d 0d 22 | a simpl|e lib.."|
|00003b20| 7b 50 72 6f 64 75 63 74 | 73 7d 22 49 43 47 6c 75 |{Product|s}"ICGlu|
|00003b30| 65 2e 6f 20 c4 20 b6 0d | 09 09 7b 47 6c 75 65 4f |e.o . ..|..{GlueO|
|00003b40| 62 6a 65 63 74 73 7d 0d | 09 4c 69 62 20 2d 6f 20 |bjects}.|.Lib -o |
|00003b50| 22 7b 50 72 6f 64 75 63 | 74 73 7d 22 49 43 47 6c |"{Produc|ts}"ICGl|
|00003b60| 75 65 2e 6f 20 b6 0d 09 | 09 7b 47 6c 75 65 4f 62 |ue.o ...|.{GlueOb|
|00003b70| 6a 65 63 74 73 7d 0d 0d | 23 20 4d 61 6b 65 20 74 |jects}..|# Make t|
|00003b80| 00 00 00 1e 00 64 00 1c | 01 dd 02 3d 00 64 00 1c |.....d..|...=.d..|
|00003b90| 01 dd 02 3d 00 00 25 72 | 00 00 00 00 00 00 00 00 |...=..%r|........|
|00003ba0| 00 00 00 00 00 28 0e 50 | 61 73 63 61 6c 20 53 79 |.....(.P|ascal Sy|
|00003bb0| 6d 62 6f 6c 73 00 0a 49 | 43 52 45 41 44 4f 4e 4c |mbols..I|CREADONL|
|00003bc0| 59 00 0a 43 4f 4d 50 4f | 4e 45 4e 54 53 47 00 00 |Y..COMPO|NENTSG..|
|00003bd0| 01 c0 00 88 0a 49 43 52 | 45 41 44 4f 4e 4c 59 00 |.....ICR|EADONLY.|
|00003be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c10| 00 00 00 00 2f 0e 4e ba | ff ff ff ff 01 00 00 74 |..../.N.|.......t|
|00003c20| 00 00 00 00 00 00 00 00 | 01 00 06 00 00 00 00 00 |........|........|
|00003c30| 01 00 01 c0 00 00 00 00 | ab 06 3d 37 00 ad 00 ca |........|..=7....|
|00003c40| 08 25 25 5f 49 4d 00 6e | 04 4d 41 49 4e 54 49 4f |.%%_IM.n|.MAINTIO|
|00003c50| 4e 54 53 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |NTS.....|........|
|00003c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c80| 00 00 00 00 00 00 00 00 | 21 6e ff e8 ff ff ff ff |........|!n......|
|00003c90| ff ff ff ff ff ff ff ff | 00 00 00 00 01 00 05 01 |........|........|
|00003ca0| 00 01 01 00 00 e4 ff ff | 00 01 00 10 ff ff 00 00 |........|........|
|00003cb0| 00 00 00 00 00 00 00 0a | 06 50 41 52 41 4d 53 4f |........|.PARAMSO|
|00003cc0| 4e 54 53 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |NTS.....|........|
|00003cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cf0| 00 00 00 00 00 00 00 00 | 2f 20 3f 20 01 00 01 52 |........|/ ? ...R|
|00003d00| ff ff ff ff 01 00 01 52 | 02 00 25 98 01 00 02 01 |.......R|..%.....|
|00003d10| 0d 68 ff ff 00 02 00 00 | 00 0c 00 10 67 34 20 6e |.h......|....g4 n|
|00003d20| ff e8 70 01 00 6e 07 53 | 54 4f 52 41 47 45 4e 54 |..p..n.S|TORAGENT|
|00003d30| 50 41 52 41 4d 45 54 45 | 52 53 00 00 00 00 00 00 |PARAMETE|RS......|
|00003d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d60| 00 00 00 00 00 00 eb 0e | 20 6e ff ff ff ff ff ff |........| n......|
|00003d70| ff ff ff ff ff ff 02 00 | 02 a2 01 00 02 00 0f 2e |........|........|
|00003d80| ff ff 00 02 00 00 00 08 | 20 6e ff ec 2f 28 00 10 |........| n../(..|
|00003d90| 4e ad 00 00 00 4c a5 76 | 72 9e ab 06 3d 37 aa fe |N....L.v|r...=7..|
|00003da0| 6a 62 00 00 ff ff ff ff | 42 85 08 08 00 00 00 00 |jb......|B.......|
|00003db0| 00 00 01 00 00 73 00 02 | 00 67 f8 4e 00 68 2d 2a |.....s..|.g.N.h-*|
|00003dc0| 00 02 3a 54 79 70 00 68 | 81 88 00 68 83 48 00 06 |..:Typ.h|...h.H..|
|00003dd0| ab 06 3d 37 00 00 00 00 | 00 00 00 00 00 02 ab 06 |..=7....|........|
|00003de0| 3d 23 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 48 |=#...H..|Monaco.H|
|00003df0| 00 00 1f 00 00 00 00 00 | 00 00 00 00 40 80 dd d8 |........|....@...|
|00003e00| 45 00 00 00 00 00 00 00 | 00 06 00 02 00 54 00 37 |E.......|.....T.7|
|00003e10| 01 d0 02 3b 00 2a 00 03 | 01 dd 02 7d ab 63 1d c5 |...;.*..|...}.c..|
|00003e20| 00 00 00 19 00 00 00 49 | 00 00 00 00 01 00 00 00 |.......I|........|
|00003e30| 01 00 00 00 03 ae 00 00 | 02 ae 00 00 00 85 00 41 |........|.......A|
|00003e40| 2c e8 0d 3a 00 00 00 1c | 00 6a 00 01 4d 50 53 52 |,..:....|.j..MPSR|
|00003e50| 00 01 00 12 75 6e 69 74 | 00 02 00 2a 03 f0 ff ff |....unit|...*....|
|00003e60| 00 00 00 00 00 00 00 00 | 03 ed ff ff 00 00 02 62 |........|.......b|
|00003e70| 00 41 2c 34 00 07 00 00 | 00 00 00 22 00 00 00 00 |.A,4....|..."....|
|00003e80| 00 03 00 0a 00 00 00 4e | 00 00 00 00 00 00 00 14 |.......N|........|
|00003e90| 00 00 02 12 00 00 00 00 | 09 55 6e 69 74 4e 61 6d |........|.UnitNam|
|00003ea0| 65 73 09 53 79 6d 62 54 | 61 62 6c 65 06 48 65 61 |es.SymbT|able.Hea|
|00003eb0| 64 65 72 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |der.....|........|
|00003ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+